Files
zstd-rs/rust/src
ddidderr ba7cc52bcc feat(compress): move CDict size aggregation to Rust
Keep ZSTD_sizeof_CDict's public behavior and workspace-sensitive layout
accounting in C, while routing its final two-size_t addition through the
Rust compression ABI. The Rust helper uses wrapping_add so its result
matches C size_t arithmetic, including overflow.

Test Plan:
- `cargo clippy --manifest-path rust/Cargo.toml --no-default-features --features compression` -- passed before and after formatting
- `cargo clippy --manifest-path rust/Cargo.toml --no-default-features --features compression --benches` -- passed before and after formatting
- `cargo clippy --manifest-path rust/Cargo.toml --no-default-features --features compression --tests` -- passed before and after formatting
- `cargo +nightly fmt --manifest-path rust/Cargo.toml` -- passed
- `cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression sizeof_cdict` -- 3 passed
- `make -B -C lib -j2 lib` -- passed
- `make -C tests test-rust-lib-smoke` -- passed
- `tests/fuzzer -s4560 -t56 -i57 -v` -- passed
- `make -C tests -j2 test-zstream` -- 84 named, 6,809 and 9,613 randomized passed
- `git diff --check` and `git diff --cached --check` -- passed
2026-07-18 12:44:53 +02:00
..
2026-07-11 14:23:39 +02:00