Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 647 Bytes

README.md

File metadata and controls

9 lines (6 loc) · 647 Bytes

Huffman Coding

The basic idea in Huffman coding is to assign short codewords to those input blocks with high probabilities and long codewords to those with low probabilities. This concept is similar to that of the Morse code. A Huffman code is designed by merging together the two least probable characters, and repeating this process until there is only one character remaining. A code tree is thus generated and the Huffman code is obtained from the labeling of the code tree.

This project is written with Python. To use, you can run the following commands in the terminal, respectively.

vertualenv venv

pip install -r requirements.txt