Files
zstd-rs/rust/src/legacy
ddidderr 821f01cf44 fix(legacy): preserve v0.7 FSE terminal symbols
The frozen v0.7 decoder's two-state FSE tail must emit state 1, reload,
state 2, reload, and possibly a final state 1 symbol.  The Rust port used
current-state and end-of-stream early exits, so historical Huffman headers
could stop one terminal weight short and corrupt a literal byte.  The legacy
corpus exposed this as the UTF-8 apostrophe's first byte changing from e2 to
e0.  Match the historical reload-driven tail and retain the exact v0.7 frame
as a regression test.

Test Plan:
- `cargo test --manifest-path rust/Cargo.toml --no-default-features --features decompression,legacy-v07 legacy::zstd_v07::tests` -- passed (6 tests)
- `cargo clippy --manifest-path rust/Cargo.toml --no-default-features --features decompression,legacy-v07 --lib -- -D warnings` -- passed
- `rustfmt +nightly --edition 2021 rust/src/legacy/zstd_v07.rs` -- passed
- `make -C tests -j2 legacy` -- blocked by the active dict-builder work's
  unrelated full-feature compilation gap
2026-07-18 15:42:43 +02:00
..