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.2.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

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