gzopen — Opens the compressed file named by path.
#include <zlib.h>
gzFile gzopen (const char *path , const char *mode );
On success, gzopen()
shall return a gzFile object (also known as
a compressed
file stream). On failure, gzopen() shall
return Z_NULL
and
may set errno
accordingly.
Note: At version 1.2.2,
zlib
does not seterrno
for several error conditions. Applications may not be able to determine the cause of an error.
The gzopen() function shall open the compressed file named by path. The mode argument is based on that of fopen(), but the mode parameter may also contain the following characters:
If path refers to an uncompressed file, and mode refers to a read mode, gzopen() shall attempt to open the file and return a gzFile object suitable for reading directly from the file without any decompression.
If path
or mode
is NULL, or if mode
does not contain
one of r, w, or a,
gzopen() shall return Z_NULL
,
and need not set any other error condition.
The gzFile object is also referred to as a compressed file stream.
#include <stdio.h> |
On error, gzopen()
may set
the global variable errno
to indicate the error.
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. |