Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Huffman Code

Example

Characteristics

Variants

Dynamic Huffman Code

Adaptive Huffman Code

Initialization

Algorithm

Example

 1. Symbol: 'a'

 2. Symbol: 'b'

 3. Symbol: 'r'

 4. Symbol: 'a'

...

11. Symbol: 'a'


Glossary

Index


Download


www.BinaryEssence.com

Example "abracadabra"


The following example demonstrates the development of the Huffman tree in the course of coding a text with 11 symbols ("abracadabra"). To describe the relevant data structures, the development of the code table is shown using the format as introduced before.


Initially a code tree will be assumed only consisting of the control character NYA (Not Yet Available). In parallel a table will be established containing all symbols that are not yet a part of the tree. In this example these are all 256 characters belonging to an ASCII or ANSI code.


 <   ^   > 

Adaptive Huffman Code Procedure Decoding 1. Symbol: a