Doesn't work if MAX_SYMBOLS > 256
Brought to you by:
drichardson
If MAX_SYMBOLS is #define'd greater than 256 the Huffman table isnt' built correctly. In huffman_node struct, 'symbol' is defined as 'unsigned char', and in new_leaf_node the 'symbol' parameter is also defined as 'unsigned char' which limits the symbol values to be within 0...255. I just redefined 'symbol' at those two places to be 'unsigned int' and it (seems to) work.