Python package for file compression using Huffman coding
Project description
Huffman Coding Python Package
This Python package implements Huffman coding for file compression and decompression.
Installation
You can install the package using pip:
pip install huff-puff
Usage
Compression (huff.py)
To compress a file using Huffman coding:
from huff import compress
compressedFile = compress("input.txt")
Decompression (huff.py)
To decompress a file previously compressed using Huffman coding:
from huff import decompress
decompressedFile = decompress("input_compressed.bin")
Huffman Functions (huffman.py)
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
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
huff-puff-0.1.0.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for huff_puff-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 312106e01149083b6a2f4727498cdaccc48706a738ec8020ffbb04a9541b1754 |
|
MD5 | b8cedd069efc044dbfc7b791f3743349 |
|
BLAKE2b-256 | d079f5e830a44405a2ccd32f9c9e9f8205f71b62f2a2762cfcd622d84359c8fa |