[Zlib-devel] Some questions about gz* functions
Mark Adler
madler at madler.net
Wed Feb 8 20:52:55 EST 2012
On Feb 8, 2012, at 9:37 AM, niXman wrote:
> Tell to me please why gz* functions use file-descriptors but not
> file-handlers? And whether will be accepted my patch which modifies
> zlib so that it was used file-handler instead of file-descriptor?
niXman,
It is for efficiency, in order to avoid an unneeded level of buffers and memcpy's. I would not be willing to change it to FILE *'s.
I'm not sure what advantages an "abstract IO-API" would confer. However I will note that the deflate and inflate functions provide full gzip support, so a zlib user can use those to interface to any sort of I/O they would like, such as through SSH.
Mark
More information about the Zlib-devel
mailing list