|
From: | Moazin Khatri |
Subject: | Re: [ft-devel] Announcing FreeType 2.10.1 - regression in ftgzip.c |
Date: | Tue, 2 Jul 2019 23:35:34 +0500 |
windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a CRC-32 instead of an Adler-32.
_______________________________________________Hi,I think the reason why this occurred is because the check "if ( w < 8 || w > 15 )" is only presentin the old version of zlib, the newer ones don't have this check.Not according to https://zlib.net/manual.html (1.2.11, latest)The windowBits parameter is the base two logarithm of the window size (the size of the history buffer).It should be in the range 8..15 for this version of the library.Larger values of this parameter result in better compression at the expense of memory usage. The default value is 15 if deflateInit is used instead.47 bits sounds like a whole lot to me anyway ;)As far as I know, FreeType can either use the externally installed Zlib (in which case this codewill work fine, hopefully). However, if your FreeType build uses the built-in copy of zlib (whichis quite old) the code breaks.Werner, I think this change shouldn't have been made to master because it fails with the built-in version of zlib. Don't know what we should do now. Probably revert it?Regards,Moazin
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel
[Prev in Thread] | Current Thread | [Next in Thread] |