This Python package implements Huffman coding for file compression and decompression.
You can install the package using pip:
pip install huff-puff
To compress a file using Huffman coding:
from huff import compress
compressedFile = compress("input.txt")
To decompress a file previously compressed using Huffman coding:
from huff import decompress
decompressedFile = decompress("input_compressed.bin")
For detailed information about the Huffman coding functions:
from huffman import make_frequency_dict, make_heap, merge_nodes, make_codes, get_encoded_text, decode_text
// Use these functions as needed within your code
This project is licensed under the MIT License.