Most file system functions use Gzip to compress files, and this module can help transparently read gzip compressed files.
Zlib Support in PHP is not enabled by default. Use--with-zlib[=dir when you need to install the PHP configuration).
The following example opens a temporary file to write the test string, and then prints the contents of the file two times.
Example #1 A simple zlib example
<?php $filename = Tempnam ('/tmp ', ' zlibtest '). '. Gz '; echo "
Related functions:
Gzclose-close an open gz-file pointer
Gzcompress-compress a string
Gzdecode-decodes a gzip compressed string
Gzdeflate-deflate a string
Gzencode-create a gzip compressed string
Gzeof-test for EOF on a gz-file pointer
Gzfile-read entire gz-file to an array
Gzgetc-get character from Gz-file pointer
Gzgets-get line from File pointer
Gzgetss-get line from Gz-file pointer and strip HTML tags
Gzinflate-inflate a deflated string
Gzopen-open Gz-file
Gzpassthru-output all remaining data on a gz-file pointer
gzputs-alias Gzwrite
Gzread-binary-safe Gz-file Read
Gzrewind-rewind the position of a gz-file pointer
Gzseek-seek on a gz-file pointer
Gztell-tell gz-file pointer read/write position
Gzuncompress-uncompress a compressed string
Gzwrite-binary-safe Gz-file Write
Readgzfile-output a Gz-file
Zlib_decode-uncompress any RAW/GZIP/ZLIB encoded data
Zlib_encode-compress data with the specified encoding
Zlib_get_coding_type-returns the coding type used for output compression