A package for canonical Huffman compression
Project description
Canonical Huffman-Compression
I created this code because I wanted an implementation of the Huffman algorithm that I couldn't find in python. It uses canonical code and saves the Huffman code dictionary with a combination of sorted symbols and the number occurrences for each code length. This is ideal for situations where the number of symbols used is significantly smaller than the number of possible symbols.
In addition to the Huffman compression/decompression, it allows for the saving and loading of compressed files. The data input must be formatted as a list of integers.
TO USE: Start off with huffman_demo.py. I believe the implementation is fairly straightforward
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
Built Distribution
File details
Details for the file canonical_huffman_compression-0.1.1.tar.gz
.
File metadata
- Download URL: canonical_huffman_compression-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48bd17a0068673aedc27f273fbcd8ff1e4feca3eebca26d32fdbdc131b4a2128 |
|
MD5 | 9f5a74fb142e9079a6b70273030cafbb |
|
BLAKE2b-256 | 85b75c95815bcadce846890d282c234d3d9a1c37a0f5fcc2277b0bb9159d9e59 |
File details
Details for the file canonical_huffman_compression-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: canonical_huffman_compression-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ed8fbafc8fea242a30ff2d8fc0ca317eee9f95d28347061712b792090558e15 |
|
MD5 | e9afbcf375e4a0bddada6930fe9e5fa9 |
|
BLAKE2b-256 | 7eb384cc52c8c8daca5c836a34cf18fe0fa190921f82323b3a058db82dff7d8f |