[Zlib-devel] zlib 1.2.4 released!
John Bowler
jbowler at frontiernet.net
Sun Mar 21 02:18:25 EDT 2010
From: zlib-devel-bounces at madler.net [mailto:zlib-devel-bounces at madler.net] On Behalf Of Mark Adler
>The reason gzclose() closes the gzdopen() file descriptor is because that's
>what fdopen() / fclose() does.
Yes, so it is a good consistency to maintain that behavior for gzdopen().
>However I'm not clear on how you can use the file descriptor in read() and
>write(), but run into problems if you use close() on it.
If the GZ data written into the file descriptor is only part of a larger object. I.e. if I want to squirt out some GZ data into the middle of a larger stream.
It's probably moot because in practice I'd almost certainly use the z_stream directly and ignore the GZ code - deflate() does everything I need.
John Bowler <jbowler at acm.org>
More information about the Zlib-devel
mailing list