Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Huffman Code

Example

Characteristics

Variants

Dynamic Huffman Code

Adaptive Huffman Code

Initialization

Algorithm

Table Code Tree

Update Procedure

New Symbols

Formats

Decoding

Update Code Tree

Decoding

Example


Glossary

Index


Download


www.BinaryEssence.com

Decoding of New Symbols


It is obvious from the code table in the following example that the first 2 bits (b = 2) are sufficient to differentiate between the two code lengths. This is always given due to the predefined conditions for b and r.


Example with 5 symbols (b = 2):


symbol  code word
  1       000b
  2       001b
  3       01b
  4       10b
  5       11b

In general the first b bit have to be read. If the value is lower than r, the next bit immediately following has to be appended. If the value is larger or equal than r, it can be used directly.


Example with 66 symbols (b = 6):


symbol  code word
  1      0d  0000 000b
  2      1d  0000 001b
  3      2d  0000 010b
  4      3d  0000 011b
  5      2d  0000 10b
  6      3d  0000 11b
  7      4d  0001 00b
 ..     ...  ...
 64     61d  1111 01b
 65     62d  1111 10b
 66     63d  1111 11b

 <   ^   > 

Integration of New Symbols Formats for New Symbols Update Code Tree