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
4 lines
129 B
C
4 lines
129 B
C
/* Huffman compression is implemented in rust/src/huf_compress.rs. */
|
|
#define FSE_STATIC_LINKING_ONLY
|
|
#include "../common/huf.h"
|