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.
Release files for huff-puff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| huff-puff-0.1.0.tar.gz | 1.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| huff_puff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:3.1 kB
Release files / huff-puff-0.1.0.tar.gz
| Download URL | huff-puff-0.1.0.tar.gz |
|---|---|
| Size | 1.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5257d3c0bd80288318659d711c4cce497c4780fe404310ce915799c90b70b67d
|
|
BLAKE2b-256 checksum How to use checksums |
03613bd6d74e651adc7dc5102189ed7691c66e1355364b3b0282793ea9ad3395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / huff_puff-0.1.0-py3-none-any.whl
| Download URL | huff_puff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
312106e01149083b6a2f4727498cdaccc48706a738ec8020ffbb04a9541b1754
|
|
BLAKE2b-256 checksum How to use checksums |
d079f5e830a44405a2ccd32f9c9e9f8205f71b62f2a2762cfcd622d84359c8fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|