[Zlib-devel] New gzio called gzlib

Mark Adler madler at alumni.caltech.edu
Sat Jan 1 15:51:27 EST 2005


On Jan 1, 2005, at 9:12 AM, Paul Marquess wrote:
> Is it your intention to remove the existing gz* functions from zlib 
> and put
> them into gzlib?

Yes, though gzlib would still be distributed with zlib.  There would be 
separate zlib.h and gzlib.h interface headers.  I'm not sure yet if 
zlib.h should automatically include gzlib.h, or whether the default 
build should combine the libraries.

The motivations for separating them are: a) the gz* functions are 
really an application of the zlib functions, not part of them, b) gzlib 
and zlib both may benefit from independent development and releases, 
and c) the separation would facilitate a libraryless compilation of 
zlib, which I have had several requests for.  (zlib 1.2.2.2 already 
took one step in that direction by removing structure assignments that 
result in hidden memcpy() calls.)

The motivation for writing a new gzlib was mainly performance -- gzio 
was not well buffered and could be rather slow, especially when using 
gzgetc().  gzlib has complete buffering and uses the lower-level i/o 
functions to avoid an extraneous layer of stdio buffering.

mark





More information about the Zlib-devel mailing list