Skip to content

BitnaKeum/Huffman_Coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huffman_Coding

Huffman Encoder & Decoder




Encoder

From input.txt, make Huffman Table
Using Huffman Table, encode input.txt and save to Huffman_code.hbs
At last, encode Huffman Table and save to Huffman_table.hbs

input.txt

image


Huffman Table

ASCII code - Frequency - Codeword

image image

encoding string

image

...

image

EOD(1011001100100) + Stuffing bit(00000) is inserted to the end of the encoding string.

Huffman_code.hbs

image

...

image


Huffman_table.hbs

image





Decoder

From Huffman_table.hbs, remake Huffman Table
Using Huffman Table, decode Huffman_code.hbs and write to output.txt

output.txt

image

same with input.txt

Releases

No releases published

Packages

No packages published

Languages