ddidderr
66e7799f04
refactor(compress): move sequence generation policy to Rust
ZSTD_generateSequences() previously mixed public parameter validation,
temporary-output allocation, sequence-collector setup, compression, and cleanup
inside the C translation unit. Move that ordering into Rust behind callbacks so
private ZSTD_CCtx and SeqCollector layouts remain C-owned. The adapter retains
C allocation, context access, and the existing ZSTD_compress2 operation, while
Rust guarantees temporary-output cleanup after collector setup failures and
compression errors and preserves the original target-block-size and worker
parameter checks.
Focused callback tests cover validation-before-allocation, cleanup on setup
failure, and successful callback ordering/count publication.
Test Plan:
- `cargo fmt --manifest-path rust/Cargo.toml --all -- --check` -- passed
- `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo test --manifest-path rust/Cargo.toml generate_sequences --lib` -- passed (3 tests)
- `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo test --manifest-path rust/Cargo.toml --all-targets` -- passed (762 tests)
- `ulimit -v 41943040; CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings` -- passed
- `ulimit -v 41943040; make -j1` -- passed
2026-07-20 04:30:33 +02:00
..
2023-01-04 13:01:54 -08:00
2026-07-10 20:32:18 +02:00
2026-07-10 20:06:25 +02:00
2024-11-26 11:15:39 +01:00
2026-07-10 21:54:23 +02:00
2026-07-19 20:05:29 +02:00
2026-07-10 22:07:27 +02:00
2023-01-12 15:41:08 -08:00
2026-07-10 22:44:39 +02:00
2024-12-20 10:36:56 -08:00
2026-07-11 23:11:57 +02:00
2023-01-04 13:01:54 -08:00
2026-07-20 04:30:33 +02:00
2024-12-19 16:00:11 -08:00
2026-07-11 08:05:25 +02:00
2025-01-07 10:06:08 -08:00
2026-07-10 22:46:15 +02:00
2025-01-07 10:06:08 -08:00
2026-07-11 08:06:30 +02:00
2025-01-07 10:06:08 -08:00
2023-01-04 13:01:54 -08:00
2026-07-19 18:27:52 +02:00
2025-01-07 10:06:08 -08:00
2026-07-12 09:51:45 +02:00
2025-01-07 10:06:08 -08:00
2026-07-10 21:28:56 +02:00
2024-12-19 16:00:11 -08:00
2026-07-20 02:49:44 +02:00
2026-07-18 01:40:18 +02:00