Module exr::compression::piz::huffman
source Β· Expand description
16-bit Huffman compression and decompression. Huffman compression and decompression routines written by Christian Rouet for his PIZ image file format.
Structs§
- Short
Code π
Enums§
- Code π
Constants§
- DECOD
E_ πBITS - DECOD
E_ πMASK - DECODIN
G_ πTABL E_ SIZE - ENCOD
E_ πBITS - ENCODIN
G_ πTABL E_ SIZE - INVALI
D_ πBIT_ COUNT - INVALI
D_ πCODE - INVALI
D_ πTABL E_ ENTRY - INVALI
D_ πTABL E_ SIZE - LONGES
T_ πLONG_ RUN - LONG_
ZEROCOD πE_ RUN - NOT_
ENOUG πH_ DATA - SHORTES
T_ πLONG_ RUN - SHOR
T_ πZEROCOD E_ RUN - TABL
E_ πTOO_ LONG - TOO_
MUCH_ πDATA
Functions§
- Build a βcanonicalβ Huffman code table:
- build_
decoding_ πtable Build a decoding hash table based on the encoding table code: - build_
encoding_ πtable Compute Huffman codes (based on frq input) and store them in frq: - code π
- count_
frequencies π - decode_
with_ πtables Decode (uncompress) n bits based on encoding & decoding tables: - length π
- pack_
encoding_ πtable Pack an encoding table: - read_
bits π - read_
byte π - read_
code_ πinto_ vec - read_
encoding_ πtable Run-length-decompresses all zero runs from the packed table to the encoding table - send_
code π - write_
bits π - write_
code π