Skip to main content

Module huffman

Module huffman 

Source
Expand description

Canonical Huffman tree decoder for bzip2.

bzip2 uses up to 6 Huffman tables per block, switching every 50 symbols. Each table encodes up to 258 symbols (256 bytes + RUNA + RUNB + EOB).

Uses a flat lookup table for codes ≤ FAST_BITS with tree fallback for longer codes.

Structs§

HuffmanTree
A Huffman decoding tree with fast table lookup. All storage is inline (no heap allocation).