I was just wondering if you choose to implement both Static and Dynamic Huffman in your Deflate Algorithms (Zlib), how would you choose which one to implement in a specific data block. In my understanding, you have to do 2 passes to the compressed data to implement Static while only 1 pass for Dynamic. Do you just implement both encoding in parallel and see which one finishes first? I plan on building the compression library in hardware (FPGA), so parallel implementation shouldn't be an issue.
Asked
Active
Viewed 820 times
2
-
Not finishes first, which one results in a smaller block. See [Understanding zlib](https://www.euccas.me/zlib/) 3. Implementation of zlib [3.4. Huffman Encoding](https://www.euccas.me/zlib/#zlib_huffman_encoding) "...choose the method which produces smaller amount of data." How would you construct candidate dynamic Huffman tables without a preliminary pass over the block? – Jan 29 '20 at 19:46