Compress-Raw-Zlib

 view release on metacpan or  search on metacpan

zlib-src/zlib.h  view on Meta::CPAN


/*
ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);

     Open the gzip (.gz) file at path for reading and decompressing, or
   compressing and writing.  The mode parameter is as in fopen ("rb" or "wb")
   but can also include a compression level ("wb9") or a strategy: 'f' for
   filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
   'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
   as in "wb9F".  (See the description of deflateInit2 for more information
   about the strategy parameter.)  'T' will request transparent writing or
   appending with no compression and not using the gzip format. 'T' cannot be
   used to force transparent reading. Transparent reading is automatically
   performed if there is no gzip header at the start. Transparent reading can
   be disabled with the 'G' option, which will instead return an error if there
   is no gzip header. 'N' will open the file in non-blocking mode.

     'a' can be used instead of 'w' to request that the gzip stream that will
   be written be appended to the file.  '+' will result in an error, since
   reading and writing to the same gzip file is not supported.  The addition of
   'x' when writing will create the file exclusively, which fails if the file
   already exists.  On systems that support it, the addition of 'e' when
   reading or writing will set the flag to close the file on an execve() call.

zlib-src/zlib.h  view on Meta::CPAN

   does not contain a gzip stream.

     If gzdirect() is used immediately after gzopen() or gzdopen() it will
   cause buffers to be allocated to allow reading the file to determine if it
   is a gzip file. Therefore if gzbuffer() is used, it should be called before
   gzdirect(). If the input is being written concurrently or the device is non-
   blocking, then gzdirect() may give a different answer once four bytes of
   input have been accumulated, which is what is needed to confirm or deny a
   gzip header. Before this, gzdirect() will return true (1).

     When writing, gzdirect() returns true (1) if transparent writing was
   requested ("wT" for the gzopen() mode), or false (0) otherwise.  (Note:
   gzdirect() is not needed when writing.  Transparent writing must be
   explicitly requested, so the application already knows the answer.  When
   linking statically, using gzdirect() will include all of the zlib code for
   gzip file reading and decompression, which may not be desired.)
*/

ZEXTERN int ZEXPORT gzclose(gzFile file);
/*
     Flush all pending output for file, if necessary, close file and



( run in 2.102 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )