Hi,
After reading through the "Self-referential structures" chapter in The C Programming Language, I modified the binary tree code in it to count the number of occurances of each byte inside a file. This works great, and now I want to advance it to use this information to perform Huffman compression on the input file.
When looking at examples of Huffman algorithms, I notice that the byte frequencies are usually stored in an array of 256 items (equal to the possible values of a byte). Should I now "flatten" my frequency tree into an array and use that as a base for building a Huffman tree, or is there a way I have not considered that would allow me to utilise the tree in its current form?