Huffman Encoding Visualization Auto-Generated Slides To Visualize Huffman Encoding by Chris Fremgen
Original File test huffman
Step 1: Get Frequencies of Letters a = 1 m = 1 f = 2 t = 2
Step 2: Initialize Nodes 1 1 1 1 1 1 1 1 2 2
Step 3: Merge Lowest Frequencies 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 1 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 2 1 1 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 2 2 1 1 1 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 2 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2
Continue to Merge Lowest Frequent 2 2 4 4 1 1 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 1
Continue to Merge Lowest Frequent 4 4 4 1 1 1 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
Continue to Merge Lowest Frequent 4 8 1 1 2 2 4 4 1 1 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 1
Continue to Merge Lowest Frequent 12 1 4 8 1 1 2 2 4 4 1 1 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 1
Huffman Codebook f = 011 h = 111 a = 101 s = 0001
Original File test huffman
Encoded Output Bits 0100010000101000001111100110111001010011
Final Output File 0100010000101000001111100110111001010011
The End Huffman Encoding Automated Visualization by Chris Fremgen