feat(rust): port compression block pre-splitting

Move ZSTD_splitBlock into Rust while retaining its caller-owned workspace
contract. The implementation preserves the C fingerprint sampling heuristic
and calls the migrated histogram primitive without adding a hot-path
allocation.

Reference-vector and randomized differential tests compare every split level
with the original C translation unit. The C source remains as a declaration
shim so existing source lists resolve the Rust ABI during the migration.

Test Plan:
- cargo fmt, cargo clippy, cargo clippy --benches, cargo clippy --tests
- cargo test --all-targets and cargo build --release
- cargo test/build --target i686-unknown-linux-gnu
- 264-case original-C/Rust differential harness
- C fuzzer, zstreamtest, and fuzzer32 smoke runs

Refs: rust/README.md
This commit is contained in:
2026-07-10 21:28:56 +02:00
parent ca70ca8061
commit 24d01b92fb
4 changed files with 379 additions and 237 deletions
+1
View File
@@ -17,3 +17,4 @@ pub mod threading;
pub mod xxhash;
pub mod zstd_common;
pub mod zstd_ddict;
pub mod zstd_presplit;