PHP Zlib Compression Functions

EditRocket provides the following information on Zlib Compression functions in the PHP source code builder.

bool gzclose ( resource $zp ) - Closes the given gz-file pointer.

string gzcompress ( string $data [, int $level ] ) - This function compress the given string using the ZLIB data format.

string gzdecode ( string $data [, int $length ] ) - This function returns a decoded version of the input data.

string gzdeflate ( string $data [, int $level ] ) - This function compress the given string using the DEFLATE data format.

string gzencode ( string $data [, int $level [, int $encoding_mode ]] ) - This function returns a compressed version of the input data compatible with the output of the gzip program.

int gzeof ( resource $zp ) - Tests the given GZ file pointer for EOF (end-of-file).

array gzfile ( string $filename [, int $use_include_path ] ) -

string gzgetc ( resource $zp ) - Returns a string containing a single (uncompressed) character read from the given gz-file pointer.

string gzgets ( resource $zp , int $length ) - Gets a (uncompressed) string of up to length - 1 bytes read from the given file pointer. Reading ends when length - 1 bytes have been read, on a newline, or on EOF (whichever comes first).

string gzgetss ( resource $zp , int $length [, string $allowable_tags ] ) -

string gzinflate ( string $data [, int $length ] ) - This function inflate a deflated string.

resource gzopen ( string $filename , string $mode [, int $use_include_path ] ) - Opens a gzip (.gz) file for reading or writing.

int gzpassthru ( resource $zp ) - Reads to EOF on the given gz-file pointer from the current position and writes the (uncompressed) results to standard output.

-

string gzread ( resource $zp , int $length ) - gzread() reads up to length bytes from the given gz-file pointer. Reading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first.

bool gzrewind ( resource $zp ) - Sets the file position indicator of the given gz-file pointer to the beginning of the file stream.

int gzseek ( resource $zp , int $offset ) - Sets the file position indicator for the given file pointer to the given offset byte into the file stream. Equivalent to calling (in C) gzseek(zp, offset, SEEK_SET).

int gztell ( resource $zp ) - Gets the position of the given file pointer; i.e., its offset into the uncompressed file stream.

string gzuncompress ( string $data [, int $length ] ) - This function uncompress a compressed string.

int gzwrite ( resource $zp , string $string [, int $length ] ) - gzwrite() writes the contents of string to the given gz-file.

int readgzfile ( string $filename [, int $use_include_path ] ) - Reads a file, decompresses it and writes it to standard output.

string zlib_get_coding_type ( void ) - Returns the coding type used for output compression.