Original Post
Hi, When Huffman encoding, would it give a higher compression, to use a single huffman tree for the whole datastream, based on the frequency of the values in the whole stream, or is it better to calculate a separate tree for different chunks of the data stream (e.g. every 64K)? Also, what is a good way to store such a Huffman tree in C++ code? Currently I use an array that contains of each bit to what node of the tree to jump, but I was wondering if there exist better and/or faster implementations. Thanks.