You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* check for an over-subscribed or incomplete set of lengths */left=1;
for (len=1; len <= MAXBITS; len++) {
left <<= 1;
left-=count[len];
if (left<0) return-1; /* over-subscribed */
}
if (left>0&& (type==CODES||max!=1))
return-1; /* incomplete set */
The difference is that zlib only allows incomplete huffman trees for distance symbols, and only if the single element has length=1.
The text was updated successfully, but these errors were encountered:
This test runs fine against flate2's zlib backend but fails with the miniz_oxide backend:
It is caused by an overly lax check in miniz_oxide of whether the set of symbol lengths are valid:
By contrast, this is the check in the zlib library:
The difference is that zlib only allows incomplete huffman trees for distance symbols, and only if the single element has length=1.
The text was updated successfully, but these errors were encountered: