feat(compress): port the public one-shot compressor to Rust

Implement ZSTD_compress in Rust using the migrated parameter, match-finder,
sequence, frame, and superblock leaves. Keep the private context and streaming
entry points C-backed until their configuration-dependent context projection is
ported, and remove only the duplicate C one-shot definition.

Test Plan:
- cargo test --manifest-path rust/Cargo.toml
- cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
- cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check
- make -B -C tests test-rust-lib-smoke V=1
- git diff --check

Refs: rust/src/zstd_compress.rs, lib/compress/zstd_compress.c
This commit is contained in:
2026-07-12 09:34:08 +02:00
parent 23e8492aa7
commit f7af4cb71f
3 changed files with 391 additions and 18 deletions
+2
View File
@@ -25,6 +25,8 @@ pub mod threading;
pub mod xxhash;
pub mod zstd_common;
#[cfg(feature = "compression")]
pub mod zstd_compress;
#[cfg(feature = "compression")]
pub mod zstd_compress_api;
#[cfg(feature = "compression")]
pub mod zstd_compress_frame;