Expand description
linflate — Fast pure-Rust DEFLATE decompressor.
Full-buffer, zero-copy, SIMD-optimized. Follows libdeflate’s architecture
with zlib-ng’s branchless refill and SIMD match copy, thread-local table
pool and segment-aware inflate_segment API.
§Usage
let mut output = vec![0u8; expected_size + linflate::OVERWRITE_HEADROOM];
let written = linflate::inflate_into(compressed, &mut output)?;
output.truncate(written);Modules§
- bitreader
- Branchless 64-bit DEFLATE bit reader.
- copy
- SIMD-accelerated LZ77 match copy.
- fastloop
- The hot DEFLATE decode loop.
- fixed
- Pre-built fixed Huffman tables for BTYPE=1 blocks (RFC 1951 §3.2.6).
- tables
- Huffman table builder with packed u32 entries.
Enums§
- Inflate
Error - Errors from the DEFLATE decompressor.
Constants§
- OVERWRITE_
HEADROOM - Extra bytes of output buffer headroom required for SIMD overwrite.
Caller must allocate
uncompressed_size + OVERWRITE_HEADROOM.
Functions§
- inflate_
into - Decompress raw DEFLATE data into a pre-allocated output buffer.
- inflate_
segment - Decompress a DEFLATE segment that may not end on BFINAL=1.
- inflate_
segment_ with_ prefix - Decompress a DEFLATE segment with a prefix window for LZ77 back-reference resolution across segment boundaries.
- inflate_
segment_ with_ prefix_ limited - Same as
inflate_segment_with_prefixbut stops afterlimitoutput bytes. Used for pass-2 fixup where only the first 32KB needs correction. - inflate_
to_ vec - Convenience: decompress into a newly allocated Vec.