Huffman coding By: Mr. Nihal Kumar(Ass. Professor)
Introduction Huffman coding is a lossless data encoding algorithm This is a method of reducing complex code into simpler sequences and is common in video encoding . This is a variable length and prefix free coding.
process The source symbols are arranged in order of decreasing probabilities(frequencies) Then the two least probabilities are assigned to bit 0 & 1. Then combine last two symbols and move the combined symbol as high as possible. Repeat the above step until two symbols left. Code for each symbol is found by moving backward
Calculation Length of code L = Entropy H= Efficiency
Redundancy
Example: with probabilities encode using Huffman Coding. Length 1 2 3 3