
15Lossless Image Compression
levels are required. The Huffman coding technique provides optimum code
symbols per source symbol. This is illustrated in Table2.4.
Huffman code is used in image formats (e.g., ZIP, JPEG). Huffman coding
is designed such that the probability of occurrence of every symbol results in
its code length. Then a binary tree is generated.
Construction of the tree is as follows:
1. Search for two nodes having the lowest frequency which are not yet
assigned to a parent node.
2. Couple these two nodes together to a new interior node.
3. Add both frequencies and assign this value to the two interior nodes.
4. Repeat unti