Implementation a huffman encoding algorithm in pure C