Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canonical_huffman_compression-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file canonical_huffman_compression-0.1.1.tar.gz.

File metadata

File hashes

Hashes for canonical_huffman_compression-0.1.1.tar.gz
Algorithm Hash digest
SHA256 48bd17a0068673aedc27f273fbcd8ff1e4feca3eebca26d32fdbdc131b4a2128
MD5 9f5a74fb142e9079a6b70273030cafbb
BLAKE2b-256 85b75c95815bcadce846890d282c234d3d9a1c37a0f5fcc2277b0bb9159d9e59

See more details on using hashes here.

File details

Details for the file canonical_huffman_compression-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for canonical_huffman_compression-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ed8fbafc8fea242a30ff2d8fc0ca317eee9f95d28347061712b792090558e15
MD5 e9afbcf375e4a0bddada6930fe9e5fa9
BLAKE2b-256 7eb384cc52c8c8daca5c836a34cf18fe0fa190921f82323b3a058db82dff7d8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page