
Deflate: Huffman Code Trees
Two different code trees are used for coding. The first tree contains codes for original data (called literals by the specification) and the sequence lengths. The second is intended for the distances.
The combination of data and length is due to the fact, that each code starts with either an original symbol or a sequence length. If the decoder determines an original symbol, it can be written to the data stream. If a length code appear, a distance code will inevitably follow.
Scheme: compressed data in Deflate
< ^ >
|