A Huffman Tree

by Chad Germany

Huffman Encoding

Huffman Encoding is a technique of compressing data to reduce its size without losing any of the details. Huffman Coding is generally useful to compress the data in which there are frequently occurring characters. The most frequent character gets the smallest code and the least frequent character gets the largest code.

Presentation Summary

In these slides, I present:

  • Basic idea behind the Huffman encoding algorithm.
  • Implementation of the algorithm on a text document.


  • huffman_encoding.ipynb: I created a text file and wrote a message that the code reads and encodes that message to huffman.txt. It can then be read and and written to decode.txt(html)

All Compression