feat(rust): port Huffman compression
Move Huffman table construction, table serialization, and one- and four-stream payload encoding from huf_compress.c into the Rust compatibility archive. The declaration-only C shim preserves the existing internal ABI, so the remaining C compressor can call the migrated implementation unchanged. The translation keeps CTable layouts, workspace checks, repeat-table selection, and bitstream output compatible with the original encoder. This lets native C consumers exercise the Rust implementation through libzstd. Test Plan: - cargo clippy, cargo clippy --benches, and cargo clippy --tests - cargo +nightly fmt and cargo test --all-targets (88 passed) - cargo check --no-default-features --features compression - rebuild and run tests fuzzer, zstreamtest, and invalidDictionaries - compare tables, headers, and 1X/4X streams with a renamed pristine C build Refs: rust/README.md component map
This commit is contained in:
@@ -22,6 +22,8 @@ zstd ABI:
|
||||
- `fse_decompress` builds FSE decoding tables and decodes FSE streams.
|
||||
- `fse_compress` normalizes counts, writes FSE headers, builds compression
|
||||
tables, and encodes FSE streams.
|
||||
- `huf_compress` builds Huffman compression tables, writes table headers,
|
||||
and encodes one- and four-stream Huffman payloads.
|
||||
- `huf_decompress` builds Huffman decoding tables and decodes X1 and X2
|
||||
Huffman streams.
|
||||
- Compression primitives
|
||||
|
||||
Reference in New Issue
Block a user