3.3.2 Huffman

Cf.

Basic Huffman encoding goes as follows:

There are a few shortcomings to the basic Huffman compression. First of all, one has to send the Huffman tree at the beginning of the compressed file, or the decompressor will not be able to decode it.

Furthermore, Huffman compression looks at the statistics of the whole file, so that if a part of the code uses some character more frequently, no adjustment is made. Even worse, sometimes (like for live information) the whole input stream is not available when compression should start.

Because of these reasons adaptive Huffman encoding has been invented, but we will not treat this topic.

Andreas Kriegl 2003-07-23