Skip to main content

Module huffman

Module huffman 

Source
Expand description

Huffman coding tables for JPEG entropy decoding and encoding.

Structs§

HuffmanDecodeTable
Huffman decode table with two-level lookup.
HuffmanEncodeTable
Huffman encode table: maps symbol → (code_bits, code_length).

Functions§

encode_value
Encode a signed value into JPEG “additional bits” representation. Returns (magnitude_bits, category/size).
extend_sign
Extend a signed value from its JPEG “additional bits” representation.