maintitle.gif (3356 bytes)
menu_intro.gif (1886 bytes)
menu_bar_h.gif (1892 bytes)
 
lossless.jpg (77783 bytes)

Statistical Compressors
Concept
Algorithm
Example
Comparison (H vs. SF)

The Concept

To accomplish this, Huffman coding creates what is called a "Huffman tree", which is a binary tree such as this one:

To read the codes from a Huffman tree, start from the root and add a '0' every time you go left to a child, and add a '1' every time you go right. So in this example, the code for the character 'A' is 0 and the code for 'D' is 110. In line with the first property of variable length encoding schemes, the more frequently-occurring 'A' has a shorter code than the rarer 'D'. Notice that since all the characters are at the leaves of the tree (the ends), there is never a chance that one code will be the prefix of another one and each code can be uniquely decoded.

Next step: Algorithm

 

back to top | home