Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Huffman Code

Example

Characteristics

Variants

Dynamic Huffman Code

Construction of the Tree

Encoding

Decoding

Alternative Construction

Variance

Adaptive Huffman Code


Glossary

Index


Download


www.BinaryEssence.com

Decoding


For decoding the Huffman tree is passed through with the encoded data step by step. Whenever a node not having a successor is reached, the assigned symbol will be written to the decoded data.


   01011101101011000101110
     encoded  decoded
      0         a
      10        b
      111       r
      0         a
      1101      c
      0         a
      1100      d
      0         a
      10        b
      111       r
      0         a

Huffman Code Tree:


 <   ^   > 

Dynamic Huffman Code Encoding Alternative Construction