Huffman encoding library written in ASM.js