Huffman Encoding Visualization AutoGenerated Slides To Visualize Huffman

  • Slides: 20
Download presentation
Huffman Encoding Visualization Auto-Generated Slides To Visualize Huffman Encoding by Chris Fremgen

Huffman Encoding Visualization Auto-Generated Slides To Visualize Huffman Encoding by Chris Fremgen

Original File test huffman

Original File test huffman

Step 1: Get Frequencies of Letters n=1 a=1 e=1 m=1 s=1 f=2 SPACE =

Step 1: Get Frequencies of Letters n=1 a=1 e=1 m=1 s=1 f=2 SPACE = 1 t=2 h=1 u=1

Step 2: Initialize Nodes n 1 e 1 s 1 Space 1 h 1

Step 2: Initialize Nodes n 1 e 1 s 1 Space 1 h 1 u 1 a 1 m 1 f 2 t 2

Step 3: Merge Lowest Frequencies n 1 e 1 s 1 Space 1 h

Step 3: Merge Lowest Frequencies n 1 e 1 s 1 Space 1 h 1 u 1 a 1 m 1 f 2 t 2

Continue to Merge Lowest Frequent 2 0 1 e 1 n 1 s 1

Continue to Merge Lowest Frequent 2 0 1 e 1 n 1 s 1 S P 1 h 1 u 1 a 1 m 1 f 2 t 2

Continue to Merge Lowest Frequent 2 0 1 0 e 1 n 1 h

Continue to Merge Lowest Frequent 2 0 1 0 e 1 n 1 h 1 2 u 1 1 s 1 a 1 m 1 SP 1 f 2 t 2

Continue to Merge Lowest Frequent 2 0 n 1 a 1 2 1 0

Continue to Merge Lowest Frequent 2 0 n 1 a 1 2 1 0 e 1 s 1 m 1 2 1 0 1 u 1 h 1 S P 1 f 2 t 2

Continue to Merge Lowest Frequent 2 0 n 1 f 2 2 1 e

Continue to Merge Lowest Frequent 2 0 n 1 f 2 2 1 e 1 0 s 1 2 1 S P 1 0 h 1 t 2 2 1 u 1 0 a 1 1 m 1

Continue to Merge Lowest Frequent 2 0 n 1 2 1 e 1 0

Continue to Merge Lowest Frequent 2 0 n 1 2 1 e 1 0 s 1 2 1 S P 1 0 h 1 2 1 u 1 0 a 1 4 1 m 1 0 f 2 1 t 2

Continue to Merge Lowest Frequent 2 0 h 1 2 1 u 1 0

Continue to Merge Lowest Frequent 2 0 h 1 2 1 u 1 0 a 1 4 1 m 1 0 f 2 4 1 0 t 2 1 2 2 0 n 1 1 0 e 1 s 1 1 S P 1

Continue to Merge Lowest Frequent 4 0 f 2 4 1 4 0 t

Continue to Merge Lowest Frequent 4 0 f 2 4 1 4 0 t 2 1 2 2 0 n 1 0 1 e 1 0 s 1 1 2 2 1 S P 1 0 h 1 1 u 1 0 a 1 1 m 1

Continue to Merge Lowest Frequent 4 8 0 1 2 2 0 h 1

Continue to Merge Lowest Frequent 4 8 0 1 2 2 0 h 1 0 1 u 1 0 a 1 1 4 4 1 m 1 0 f 2 1 0 t 2 1 2 2 0 n 1 1 0 e 1 s 1 1 S P 1

Continue to Merge Lowest Frequent 0 4 0 h 1 1 u 1 0

Continue to Merge Lowest Frequent 0 4 0 h 1 1 u 1 0 a 1 8 0 2 2 0 1 2 1 4 4 1 m 1 0 f 2 1 0 t 2 1 2 2 0 n 1 1 0 e 1 s 1 1 S P 1

Huffman Codebook SPACE = 0000 e = 0010 u = 110 n = 0011

Huffman Codebook SPACE = 0000 e = 0010 u = 110 n = 0011 t = 010 m = 100 f = 011 h = 111 a = 101 s = 0001

Original File test huffman

Original File test huffman

Encoded Output Bits 010000101000001111100110111001010011

Encoded Output Bits 010000101000001111100110111001010011

Final Output File SPACE = 0000 e = 0010 u = 110 n =

Final Output File SPACE = 0000 e = 0010 u = 110 n = 0011 t = 010 m = 100 f = 011 h = 111 a = 101 s = 0001 010000101000001111100110111001010011

The End Huffman Encoding Automated Visualization by Chris Fremgen

The End Huffman Encoding Automated Visualization by Chris Fremgen