in https://www.rfc-editor.org/rfc/rfc1951
Note that in the "deflate" format, the Huffman codes for the
various alphabets must not exceed certain maximum code lengths.
the max code length definition is 15.
what happens when the Huffman code length exceed 15?
from https://cs.stackexchange.com/questions/75542/maximum-size-of-huffman-codes-for-an-alphabet-containing-256-letters The maximum possible code size for a 256 symbol alphabet is 256 bits. Consider the case when the most frequent symbol has frequency 1/2, the next most frequent symbol has frequency 1/4, then 1/8
so in literal/length alphabet the max Huffman code length is 285-1=284 but in zlib the max code length is 15.
- why 15 was choose as the max code length?
- will zlib fail is code length exceed 15?