Basic implementation of huffman coding in C