Skip to content

A complete Huffman Coding compression algorithm written in Python

License

Notifications You must be signed in to change notification settings

ThePotato10/huffman-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

huffman-coding

A complete Huffman Coding compression algorithm written in Python


Compression is the art of making files smaller. And one of the most popular ways to do that is through something called Huffman Coding


Huffman Coding is a lossless compression technique that works by assigning the endpoint of a tree to each letter in the text to be encoded. These letters are then represented by a string of 1's and 0's that dictate how you traverse the tree. This compression method is the most efficient way to encode the individual bits in large text files, but doesn't do well with smaller ones because the tree also has to be transmitted

I can't really explain it well, but this video does a much better job: https://www.youtube.com/watch?v=JsTptu56GM8

Anyway, when I first learned about this, I was inspired

And so I started building.

For 4 weeks, whenever I had free time, I hacked away on this


And finally, it's finished. Written in native Python, with no libraries or other fancy boondoggles

It's simply a Huffman Coding algorithm written in native Python


License & Contributing

This code is licensed under the MIT license. if you spot a bug or want to contribute, just open a PR. All help is welcome

Releases

No releases published

Packages

No packages published

Languages