Search code examples
zlibcompressionhuffman-codeadler32

Can a stream contain some fix huffman compressed block and some dynamic huffman compressed blocks


Is it possible to compress a stream with some blocks compressed with static Huffman encoding, and some blocks compressed with dynamic Huffman encoding? If yes, is it decompressible ?


Solution

  • Yes, and yes. A stream can contain a mix of all three block types, with the third type being stored.