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

4. Symbol: 'a'


Current code tree


                Successor
No. Pred. Cont. "0"  "1"  Weight
 5.   7   NYA    -    -      0
 6.   7   "r"    -    -      1
 7.  10    -     5    6      1
 8.  10   "b"    -    -      1
 9.  11   "a"    -    -      1
10.  11    -     7    8      2
11.  Root        9   10      3

The current node is already the most significant node of the block. Therefore its weight may be incremented without exchange:


                Successor
No. Pred. Cont. "0"  "1"  Weight
 5.   7   NYA    -    -      0
 6.   7   "r"    -    -      1
 7.  10    -     5    6      1
 8.  10   "b"    -    -      1
 9.  11   "a"    -    -      2
10.  11    -     7    8      2
11.  Root        9   10      3

Continue with the predecessor of the current node:


                Successor
No. Pred. Cont. "0"  "1"  Weight
 5.   7   NYA    -    -      0
 6.   7   "r"    -    -      1
 7.  10    -     5    6      1
 8.  10   "b"    -    -      1
 9.  11   "a"    -    -      2
10.  11    -     7    8      2
11.  Root        9   10      3

The current node is already the most significant node of the block. Therefore its weight may be incremented without exchange:


                Successor
No. Pred. Cont. "0"  "1"  Weight
 5.   7   NYA    -    -      0
 6.   7   "r"    -    -      1
 7.  10    -     5    6      1
 8.  10   "b"    -    -      1
 9.  11   "a"    -    -      2
10.  11    -     7    8      2
11.  Root        9   10      4

The root node is reached, the update procedure will be terminated.


 <   ^   > 

Example abracadabra 3. Symbol: r 11. Symbol: a