gzread — Reads from a compressed file.
Libz.lib
#include <zlib.h>
int gzread (gzFile file, voidp buf, unsigned int len);
On success, gzread()
shall return the
number of bytes
decompressed into buf.
If gzread() returns 0
,
either the end-of-file has been reached
or an underlying read error has occurred. Applications
should use gzerror() or gzeof()
to determine which occurred.
On other errors, gzread() shall return a
value less than 0
and
and applications may examine the cause using gzerror().
The gzread() function shall read data from the compressed file referenced by file, which shall have been opened in a read mode (see gzopen() and gzdopen()). The gzread() function shall read data from file, and uncompress it into buf. At most, len bytes of uncompressed data shall be copied to buf. If the file is not compressed, gzread() shall simply copy data from file to buf without alteration.
To read from a compressed file:
#include <stdio.h> |
On error, gzread() shall set the error number associated with the stream identified by file to indicate the error. Applications should use gzerror() to access this error value.
For additional information or queries on this page send feedback
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|