Well thats 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. • Is zlib thread-safe? Yes. However any library routines that zlib uses and any application- provided memory allocation routines must also be thread-safe. zlib’s gz* functions use stdio library routines, and most of zlib’s functions use the library memory allocation routines by default. zlib’s Init functions allow for the application to provide custom memory allocation routines. Of course, you should only operate on any given zlib or gzip stream from a single thread at a time. • Can I use zlib in my commercial application? Yes. Please read the license in zlib.h. • Is zlib under the GNU license? No. Please read the license in zlib.h. • The license says that altered source versions must be “plainly marked”. So what exactly do I need to do to meet that requirement? You need to change