Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 776 Bytes

README.md

File metadata and controls

16 lines (10 loc) · 776 Bytes

Huffman Coding Using Python

This project was done as mini project. Here, Huffman algorithm is used to convert string to the Huffman codes and to compress/decompress a file.

Testing / Running the program

  1. Clone the repository

  2. The program consists of two python files, huffman.py and use.py. To convert string to respective huffman code, run huffman.py.

  3. To compress a file, you can use use.py, the compress_decompress() function will perform compression and decompression simultaneously on the file of path. the choose_own_file() will allow user to browse for a file and compress them. The mapping key will be stored in key.json file. Using the key, user can again choose the compressed file and decompress it sample file.