gzgets — Reads a string from a compressed file.
On success, gzgets()
shall return a
pointer to buf. Otherwise, gzgets()
shall return Z_NULL.
Applications may examine the cause using gzerror().
The gzgets() function shall attempt to read data from the compressed file stream file, uncompressing it into buf until either len-1 bytes have been inserted into buf, or until a newline character has been uncompressed into buf. A null byte shall be appended to the uncompressed data. The file shall have been opened in for reading (see gzopen() and gzdopen()).
#include <stdio.h> |
Output
length of the output is 7. |
On error, gzgets() shall return Z_NULL. The following conditions shall always be treated as an error:
file
is NULL ,
or does not refer to a file open for reading; |
buf
is NULL ; |
len is less than or equal to zero. |
For additional information or queries on this page send feedback
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |