feat(compress): move dictionary entropy loading to Rust

Port ZSTD_dictNCountRepeat and ZSTD_loadCEntropy to a dedicated Rust compression module. Preserve the existing C-facing ZSTD_loadCEntropy symbol through a narrow shim while keeping dictionary content and compression-context ownership in C.

Test Plan:

- cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression

- cargo clippy --manifest-path rust/Cargo.toml --no-default-features --features compression --benches --tests

- make -B -C lib -j2 lib

- make -C tests -j2 test-invalidDictionaries

- make -C tests -j2 test-zstream
This commit is contained in:
2026-07-18 07:33:06 +02:00
parent 77841fcfd2
commit 37eb757585
3 changed files with 485 additions and 104 deletions
+2
View File
@@ -37,6 +37,8 @@ pub mod zstd_compress;
#[cfg(feature = "compression")]
pub mod zstd_compress_api;
#[cfg(feature = "compression")]
pub mod zstd_compress_dictionary;
#[cfg(feature = "compression")]
pub mod zstd_compress_frame;
#[cfg(feature = "compression")]
pub mod zstd_compress_literals;