Skip to main content

This is a huffman code compressor

Project description


PyPI format


This package allows its users to shrink any ASCII based file using Huffman Code algorithm.


PyHuff is available in PyPi:

$ pip install pyhuff


To shrink a file named example.txt:

$ pyhuff example.txt

Two files will be created:

  • example.huff: the encoded file
  • example.tree.huff: the huffman tree used to encode the file

To restore the original file:

$ pyhuff example.huff example.tree.huff decoded_example.txt

In the example above, the decoded file will be created as decoded_example.txt. You can pass any filename as argument. Notice that, if the given file already exists, it will be overwritten.

To get help, simply call:

$ pyhuff

created by Durval Carvalho and Victor Moura

Project details

Download files

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

Files for pyhuff, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size pyhuff-1.1-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page