Huffman Coding

This section describes functions implementing the Huffman coding algorithm. This algorithm performs so called entropy encoding. The main idea of this method is to substitute the code words (Huffman codes) instead of symbols. The least length codes correspond to the most often occurring symbols allowing to perform compression. For example, the sequence “aaaaaaaa” contains only one symbol ‘a' that corresponds to the Huffman code with size 1 bit; after encoding the output sequence will have size 1 byte - thus compression ratio will be 8.

Limitations and conventions.

Intel IPP functions implement the Huffman static encoding. This means that encoding is a two-passes operation. In the first pass the probability structure of the source data is determined, then in the second pass the encoding itself is performed. The table of Huffman Code lengths must be passed to decoder (this table can be effectively compressed).

Maximum length of the Huffman codes in the Intel IPP functions for Huffman coding is 32 bits.

The functions for Huffman encoding/decoding initialize a correspondent specification structure and perform the encoding and decoding operations.

To use the functions for encoding, follow this general scheme:

To use these functions for decoding, follow this general scheme:


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.