Huffman Encoding Algorithm
- Take the two least probable symbols in the alphabet (longest codewords, equal length, differing in last digit)
- Combine these two symbols into a single symbol and repeat.
Huffman Encoding Example
Disadvantages Of The Huffman Code
- Changing ensemble
- If the ensemble changes the frequencies and probabilities change the optimal coding changes
- For example in text compression symbol frequencies vary with context
- ReComputing the Huffman code by running through the entire file in advance?
- Saving or transmitting the code too
- Does not consider 'blocks of symbols'
- 'strings_of_ch' the next nine symbols are predictable 'aracters_', but bits are used without conveying any new information
