feat(compress): route complete stream frames through Rust
Route ordinary complete-input ZSTD_compressStream2 calls through the Rust frame compressor while retaining the C state machine for partial, advanced, and dictionary-backed streams. Track explicit maxBlockSize requests so the migrated path preserves the original byte-identical default behavior, and extend the C archive smoke test across context reuse and fallback cases. Test Plan: - cargo clippy --manifest-path rust/Cargo.toml - cargo clippy --manifest-path rust/Cargo.toml --benches - cargo clippy --manifest-path rust/Cargo.toml --tests - cargo test --manifest-path rust/Cargo.toml --no-default-features --features compression (133 passed) - make -B -C tests -j2 test-rust-lib-smoke and ./tests/rustLibSmoke - make -B -C tests -j2 test-zstream (passed, including both APIs and maxBlockSize case 78)
This commit is contained in:
@@ -518,6 +518,10 @@ struct ZSTD_CCtx_s {
|
||||
U32 frameEnded;
|
||||
/* The next one-shot stream call may reuse a Rust-compressed frame. */
|
||||
unsigned rustSimpleCompress2Completed;
|
||||
/* A caller may explicitly set maxBlockSize to zero. Keep that request
|
||||
* on the C path so it remains byte-identical to the explicit default
|
||||
* maxBlockSize value. */
|
||||
unsigned rustSimpleCompress2MaxBlockSizeSet;
|
||||
|
||||
/* Stable in/out buffer verification */
|
||||
ZSTD_inBuffer expectedInBuffer;
|
||||
|
||||
Reference in New Issue
Block a user