This is a python project that can compress files using Huffman Algorithm
To use this project, follow these steps:
-
Copy your file in the project folder:
-
Change the filename in
encode.py
:
input_filepath = "yourfilename.example"
-
Run the
encode.py
file this will create the.compressed
(compressed version of your file) file you desire -
to decode the
.compressed
file change the compressed filename and output filename indecode.py
:
output_filepath = "output.example"
input_filepath = "compressedfile.example" + '.compressed'
- Run the
decode.py
file this will decompress the.compressed
file and give you the original file that is usable