First picture: I finally finished the Huffman compression algorithm!!!! Will upload final version to github @ thisaddress
Second picture: I wrote a note to my friend when we were sitting in the “quiet zone“-room after finding a terrible “bug” in my decoding function that I worked on finding for at least two hours.
The rest of the assignment is to write a paper on David A. Huffman and his compression algorithm, how I implemented it and how I could improve it. I might post the paper here if it turns out well. I'll warm up on writing the paper by explaining the algorithm to you!
Huffman coding is a compression algorithm that uses the knowledge that some characters occur more often than others. With this knowledge the algorithm can change how the more frequent characters are represented in bits. For example, the character ‘a’ in ascii is written as 01100001 in binary, but since ‘a’ is more frequent than ‘]‘ in most English literature; We can make ‘a‘ = 0110 in binary instead. If we do this with every character that can be represented by 1 byte (256 characters) we get a different character set where the most common characters can be represented with fewer than 8 bits and the more rare characters with more than 8 bits. We do this by building a binary tree where a left child is 0 and a right child is 1 and a leaf is a character.
This is a super concise probably a bit unclear description of the algorithm but if you are interested in reading more about it, either wait for my paper or go to the following links:
The site I used to learn about how to build my tree.
A blog post that has great pictures describing the process of building the tree.
And, ofcourse wikipedia!









