[Zlib-devel] GZ_NOCOMPRESS

Mark Adler madler at alumni.caltech.edu
Sat Jul 14 20:36:04 EDT 2007


Glenn,

The intent of NO_GZCOMPRESS is to avoid dragging in the deflate code  
if you're using the gz* file functions only for decompression.   
Normally the gzopen() function drags in both the compression and  
decompression code, since it decides which to call based on the user  
parameter (e.g. "w" vs. "r").

I don't see the relation of that to a PNG decoder, which would not  
use the gz* functions at all.  A PNG decoder would naturally only use  
decompression functions, so only the inflate object files would be  
linked into the code.  If compression is not used, the linker won't  
pull in the deflate.o or compress.o code, so it doesn't matter  
whether they're in the library or not.

Mark





More information about the Zlib-devel mailing list