Huffman Encoding

Created: 2023-05-20T23:21:10-05:00

Return to the Index

This card pertains to a resource available on the internet.

Do a pass over a set of data to figure out the vocabulary (symbols in input) and how frequently those symbols appear.

Construct a binary heap over the statistics.

Then write coding that gives you directions through the heap (left or right at each position) with a prefixing mechanism to indicate depth and how many bits a decoder must read.

I used to struggle with this algorithm when i was 12 :(