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 the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In particular, the final version number needs to be changed to f, and an identification string should be appended to ZLIB_VERSION. Version numbers x.x.x.f are reserved for modifi