How to change deflate stream output format(raw, zlib, gzip) when use zlib?
问题 Zlib can output three format, I try to search the docs and zlib.h , but can't find a clear explanation about the options, anyone have any ideas? 回答1: From the zlib.h documentation of deflateInit2() : windowBits can also be -8..-15 for raw deflate. In this case, -windowBits determines the window size. deflate() will then generate raw deflate data with no zlib header or trailer, and will not compute a check value. windowBits can also be greater than 15 for optional gzip encoding. Add 16 to