Frequently Asked Questions about zlib
Well that's nice, but how do I make a gzip file in memory?You can request that deflate write the gzip format instead of the zlib format using deflateInit2(). You can also request that inflate decode the gzip format using inflateInit2(). Read zlib.h for more details.