Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Huffman Code

Example

Characteristics

Variants

Dynamic Huffman Code

Construction of the Tree

1. Step

2. Step

3. Step

4. Step

Code Table

Encoding

Decoding

Alternative Construction

Variance

Adaptive Huffman Code


Glossary

Index


Download


www.BinaryEssence.com

Code Table


If only one single node is remaining within the table, it forms the root of the Huffman tree. The paths from the root node to the leaf nodes define the code word used for the corresponding symbol:


   Symbol   Frequency   Code Word
       a      5          0
       b      2          10
       r      2          111
       c      1          1101
       d      1          1100

Complete Huffman Tree:



 <   ^   > 

Construction of the Tree 4. Step Encoding