ZLib, is pretty blooming good. Integration was a clear clase of "clunk click". To be fair, we don't use it for anything other than to support LibPNG, since we have and use our own lossless compression for any archival storage. For this reason, it's difficult to say, how well or otherwise the main compression functions integrate into an application.
The manual for ZLib is here, and as usual Wikipedia has something to say on the matter.
Because we use our own memory manager, it was necassary to modify some functions in ZLib, such that it is able work with LibPNG. It's not clear that ZLib actually manipulates any memory passed to it, in fact. Because LibPNG and ZLib were already so well integrated, there was no need to even look at the interface. Notwithstanding, we do interface with LibPNG. LibPNG uses our memory manager for that reason. We couldn't tell if ZLib would be allright with that so we took the precaution of preventing any possible problem by modifying the following functions in ZLib;
Making the usual disclaimers, we don't want to give the good folks of ZLib, problems. If you want the sources for ZLib we recommend you get them from their website. We publish here the changes that we made to their libraries so that they would work in our application. You should do the same.