Ref/zlib-Phpdoc专题
deflate_add
Incrementally deflate data
说明
string<span
class="type">false <span
class="methodname">deflate_add ( <span
class="type">DeflateContext $context , <span
class="methodparam">string $data [,
int
$flush_mode =
ZLIB_SYNC_FLUSH ] )
Incrementally deflates data in the specified context.
参数
context
A context created with deflate_init.
data
A chunk of data to compress.
flush_mode
One of ZLIB_BLOCK, ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH,
ZLIB_SYNC_FLUSH (default), ZLIB_FULL_FLUSH,
ZLIB_FINISH. Normally you will want to set ZLIB_NO_FLUSH to
maximize compression, and ZLIB_FINISH to terminate with the last
chunk of data. See the
» zlib manual
for a detailed description of these constants.
返回值
Returns a chunk of compressed data, 或者在失败时返回 false.
错误/异常
If invalid arguments are given, an error of level E_WARNING is
generated.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | context expects a DeflateContext instance now; previously, a resource was expected. |
参见
- deflate_init
deflate_init
Initialize an incremental deflate context
说明
DeflateContext<span
class="type">false <span
class="methodname">deflate_init ( <span
class="methodparam">int $encoding [,
array
$options = [] ] )
Initializes an incremental deflate context using the specified
encoding.
Note that the window option here only sets the window size of the
algorithm, differently from the zlib filters where the same parameter
also sets the encoding to use; the encoding must be set with the
encoding parameter.
Limitation: there is currently no way to set the header information on a GZIP compressed stream, which are set as follows: GZIP signature (\x1f\x8B); compression method (\x08 == DEFLATE); 6 zero bytes; the operating system set to the current system (\x00 = Windows, \x03 = Unix, etc.)
参数
encoding
One of the *`ZLIBENCODING`** constants.
options
An associative array which may contain the following elements:
level
The compression level in range -1..9; defaults to -1.
memory
The compression memory level in range 1..9; defaults to 8.
window
The zlib window size (logarithmic) in range 8..15; defaults to 15.
zlib changes a window size of 8 to 9, and as of zlib 1.2.8 fails
with a warning, if a window size of 8 is requested for
ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP.
strategy
One of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE,
ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the default).
dictionary
A string or an array
of strings of the preset dictionary (default:
no preset dictionary).
返回值
Returns a deflate context resource (zlib.deflate) on success,
或者在失败时返回 false.
错误/异常
If an invalid option is passed to options or the context couldn't be
created, an error of level E_WARNING is generated.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | On success, this function returns a DeflateContext instance now; previously, a resource was returned. |
参见
- deflate_add
- inflate_init
gzclose
Close an open gz-file pointer
说明
bool gzclose (
resource
$stream )
Closes the given gz-file pointer.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
成功时返回 true, 或者在失败时返回 false。
范例
示例 #1 gzclose example
<?php
$gz = gzopen('somefile.gz','w9');
gzputs ($gz, 'I was added to somefile.gz');
gzclose($gz);
?>
参见
- gzopen
gzcompress
Compress a string
说明
string<span
class="type">false <span
class="methodname">gzcompress ( <span
class="type">string $data [, <span
class="methodparam">int $level<span
class="initializer"> = -1 [, <span
class="methodparam">int $encoding<span
class="initializer"> = ZLIB_ENCODING_DEFLATE ]] )
This function compresses the given string using the ZLIB data format.
For details on the ZLIB compression algorithm see the document "» ZLIB Compressed Data Format Specification version 3.3" (RFC 1950).
Note:
This is not the same as gzip compression, which includes some header data. See gzencode for gzip compression.
参数
data
The data to compress.
level
The level of compression. Can be given as 0 for no compression up to 9
for maximum compression.
If -1 is used, the default compression of the zlib library is used which is 6.
encoding
One of *`ZLIBENCODING`** constants.
返回值
The compressed string or false if an error occurred.
范例
示例 #1 gzcompress example
<?php
$compressed = gzcompress('Compress me', 9);
echo $compressed;
?>
参见
- gzdeflate
- gzinflate
- gzuncompress
- gzencode
gzdecode
Decodes a gzip compressed string
说明
string<span
class="type">false <span
class="methodname">gzdecode ( <span
class="type">string $data [, <span
class="methodparam">int $max_length<span
class="initializer"> = 0 ] )
This function returns a decoded version of the input data.
参数
data
The data to decode, encoded by gzencode.
max_length
The maximum length of data to decode.
返回值
The decoded string, or false if an error occurred.
参见
- gzencode
gzdeflate
Deflate a string
说明
string<span
class="type">false <span
class="methodname">gzdeflate ( <span
class="type">string $data [, <span
class="methodparam">int $level<span
class="initializer"> = -1 [, <span
class="methodparam">int $encoding<span
class="initializer"> = ZLIB_ENCODING_RAW ]] )
This function compresses the given string using the DEFLATE data format.
For details on the DEFLATE compression algorithm see the document "» DEFLATE Compressed Data Format Specification version 1.3" (RFC 1951).
参数
data
The data to deflate.
level
The level of compression. Can be given as 0 for no compression up to 9
for maximum compression. If not given, the default compression level
will be the default compression level of the zlib library.
encoding
One of *`ZLIBENCODING`** constants.
返回值
The deflated string or false if an error occurred.
范例
示例 #1 gzdeflate example
<?php
$compressed = gzdeflate('Compress me', 9);
echo $compressed;
?>
参见
- gzinflate
- gzcompress
- gzuncompress
- gzencode
gzencode
Create a gzip compressed string
说明
string<span
class="type">false <span
class="methodname">gzencode ( <span
class="type">string $data [, <span
class="methodparam">int $level<span
class="initializer"> = -1 [, <span
class="methodparam">int $encoding<span
class="initializer"> = ZLIB_ENCODING_GZIP ]] )
This function returns a compressed version of the input data
compatible with the output of the gzip program.
For more information on the GZIP file format, see the document: » GZIP file format specification version 4.3 (RFC 1952).
参数
data
The data to encode.
level
The level of compression. Can be given as 0 for no compression up to 9
for maximum compression. If not given, the default compression level
will be the default compression level of the zlib library.
encoding
The encoding mode. Can be FORCE_GZIP (the default) or
FORCE_DEFLATE.
Prior to PHP 5.4.0, using FORCE_DEFLATE results in a standard zlib
deflated string (inclusive zlib headers) after a gzip file header but
without the trailing crc32 checksum.
In PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant
output, consisting of a zlib header, the deflated data, and an Adler
checksum.
返回值
The encoded string, or false if an error occurred.
范例
The resulting data contains the appropriate headers and data structure to make a standard .gz file, e.g.:
示例 #1 Creating a gzip file
<?php
$data = implode("", file("bigfile.txt"));
$gzdata = gzencode($data, 9);
$fp = fopen("bigfile.txt.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
?>
参见
- gzdecode
- gzdeflate
- gzinflate
- gzuncompress
- gzcompress
- » ZLIB Compressed Data Format Specification (RFC 1950)
gzeof
Test for EOF on a gz-file pointer
说明
bool gzeof (
resource
$stream )
Tests the given GZ file pointer for EOF.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
Returns true if the gz-file pointer is at EOF or an error occurs;
otherwise returns false.
范例
示例 #1 gzeof example
<?php
$gz = gzopen('somefile.gz', 'r');
while (!gzeof($gz)) {
echo gzgetc($gz);
}
gzclose($gz);
?>
gzfile
Read entire gz-file into an array
说明
array<span
class="type">false gzfile
( string
$filename [, <span
class="type">int $use_include_path =
0 ] )
This function is identical to readgzfile, except that it returns the file in an array.
参数
filename
The file name.
use_include_path
You can set this optional parameter to 1, if you want to search for
the file in the
include_path
too.
返回值
An array containing the file, one line per cell, empty lines included,
and with newlines still attached, 或者在失败时返回 false.
范例
示例 #1 gzfile example
<?php
$lines = gzfile('somefile.gz');
foreach ($lines as $line) {
echo $line;
}
?>
参见
- readgzfile
- gzopen
gzgetc
Get character from gz-file pointer
说明
string<span
class="type">false gzgetc
( resource
$stream )
Returns a string containing a single (uncompressed) character read from the given gz-file pointer.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
The uncompressed character or false on EOF (unlike <span
class="function">gzeof).
范例
示例 #1 gzgetc example
<?php
$gz = gzopen('somefile.gz', 'r');
while (!gzeof($gz)) {
echo gzgetc($gz);
}
gzclose($gz);
?>
参见
- gzopen
- gzgets
gzgets
Get line from file pointer
说明
string<span
class="type">false gzgets
( resource
$stream [, <span
class="type">int $length =
1024 ] )
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).
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
length
The length of data to get.
返回值
The uncompressed string, or false on error.
范例
示例 #1 gzgets example
<?php
$handle = gzopen('somefile.gz', 'r');
while (!gzeof($handle)) {
$buffer = gzgets($handle, 4096);
echo $buffer;
}
gzclose($handle);
?>
参见
- gzopen
- gzgetc
- gzwrite
gzgetss
Get line from gz-file pointer and strip HTML tags
Warning
本函数已自 PHP 7.3.0 起废弃。强烈建议不要使用本函数。
说明
string gzgetss
( resource
$zp , int
$length [, <span
class="type">string $allowable_tags ] )
Identical to gzgets, except that <span class="function">gzgetss attempts to strip any HTML and PHP tags from the text it reads.
参数
zp
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
length
The length of data to get.
allowable_tags
You can use this optional parameter to specify tags which should not be
stripped.
返回值
The uncompressed and stripped string, or false on error.
范例
示例 #1 gzgetss example
<?php
$handle = gzopen('somefile.gz', 'r');
while (!gzeof($handle)) {
$buffer = gzgetss($handle, 4096);
echo $buffer;
}
gzclose($handle);
?>
参见
- gzopen
- gzgets
- strip_tags
gzinflate
Inflate a deflated string
说明
string<span
class="type">false <span
class="methodname">gzinflate ( <span
class="type">string $data [, <span
class="methodparam">int $max_length<span
class="initializer"> = 0 ] )
This function inflates a deflated string.
参数
data
The data compressed by gzdeflate.
max_length
The maximum length of data to decode.
返回值
The original uncompressed data or false on error.
The function will return an error if the uncompressed data is more than
32768 times the length of the compressed input data or more than the
optional parameter max_length.
范例
示例 #1 gzinflate example
<?php
$compressed = gzdeflate('Compress me', 9);
$uncompressed = gzinflate($compressed);
echo $uncompressed;
?>
参见
- gzdeflate
- gzcompress
- gzuncompress
- gzencode
gzopen
Open gz-file
说明
resource<span
class="type">false gzopen
( string
$filename , <span
class="type">string $mode [, <span
class="methodparam">int
$use_include_path = 0 ] )
Opens a gzip (.gz) file for reading or writing.
gzopen can be used to read a file which is not in gzip format; in this case gzread will directly read from the file without decompression.
参数
filename
The file name.
mode
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. (See the
description of deflateInit2 in zlib.h for more information about the
strategy parameter.)
use_include_path
You can set this optional parameter to 1, if you want to search for
the file in the
include_path
too.
返回值
Returns a file pointer to the file opened, after that, everything you read from this file descriptor will be transparently decompressed and what you write gets compressed.
If the open fails, the function returns false.
范例
示例 #1 gzopen Example
<?php
$fp = gzopen("/tmp/file.gz", "r");
?>
参见
- gzclose
gzpassthru
Output all remaining data on a gz-file pointer
说明
int gzpassthru
( resource
$stream )
Reads to EOF on the given gz-file pointer from the current position and writes the (uncompressed) results to standard output.
Note:
You may need to call gzrewind to reset the file pointer to the beginning of the file if you have already written data to it.
小贴士
If you just want to dump the contents of a file to the output buffer, without first modifying it or seeking to a particular offset, you may want to use the readgzfile function, which saves you the gzopen call.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
The number of uncompressed characters read from gz and passed through
to the input, or false on error.
范例
示例 #1 gzpassthru example
<?php
$fp = gzopen('file.gz', 'r');
gzpassthru($fp);
gzclose($fp);
?>
gzputs
别名 gzwrite
说明
此函数是该函数的别名: gzwrite.
gzread
Binary-safe gz-file read
说明
string<span
class="type">false gzread
( resource
$stream , <span
class="type">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.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
length
The number of bytes to read.
返回值
The data that have been read, 或者在失败时返回 false.
更新日志
| 版本 | 说明 |
|---|---|
| 7.4.0 | This functions returns false on failure now; previously 0 was returned. |
范例
示例 #1 gzread example
<?php
// get contents of a gz-file into a string
$filename = "/usr/local/something.txt.gz";
$zd = gzopen($filename, "r");
$contents = gzread($zd, 10000);
gzclose($zd);
?>
参见
- gzwrite
- gzopen
- gzgets
- gzgetss
- gzfile
- gzpassthru
gzrewind
Rewind the position of a gz-file pointer
说明
bool gzrewind
( resource
$stream )
Sets the file position indicator of the given gz-file pointer to the beginning of the file stream.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
成功时返回 true, 或者在失败时返回 false。
参见
- gzseek
- gztell
gzseek
Seek on a gz-file pointer
说明
int gzseek (
resource
$stream , <span
class="type">int $offset [, <span
class="methodparam">int $whence<span
class="initializer"> = SEEK_SET ] )
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).
If the file is opened for reading, this function is emulated but can be extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
offset
The seeked offset.
whence
whence values are:
SEEK_SET- Set position equal tooffsetbytes.SEEK_CUR- Set position to current location plusoffset.
If whence is not specified, it is assumed to be SEEK_SET.
返回值
Upon success, returns 0; otherwise, returns -1. Note that seeking past EOF is not considered an error.
范例
示例 #1 gzseek example
<?php
$gz = gzopen('somefile.gz', 'r');
gzseek($gz,2);
echo gzgetc($gz);
gzclose($gz);
?>
参见
- gztell
- gzrewind
gztell
Tell gz-file pointer read/write position
说明
int<span
class="type">false gztell
( resource
$stream )
Gets the position of the given file pointer; i.e., its offset into the uncompressed file stream.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
返回值
The position of the file pointer or false if an error occurs.
参见
- gzopen
- gzseek
- gzrewind
gzuncompress
Uncompress a compressed string
说明
string<span
class="type">false <span
class="methodname">gzuncompress ( <span
class="type">string $data [, <span
class="methodparam">int $max_length<span
class="initializer"> = 0 ] )
This function uncompress a compressed string.
参数
data
The data compressed by gzcompress.
max_length
The maximum length of data to decode.
返回值
The original uncompressed data or false on error.
The function will return an error if the uncompressed data is more than
32768 times the length of the compressed input data or more than the
optional parameter max_length.
范例
示例 #1 gzuncompress example
<?php
$compressed = gzcompress('Compress me', 9);
$uncompressed = gzuncompress($compressed);
echo $uncompressed;
?>
参见
- gzcompress
- gzinflate
- gzdeflate
- gzencode
gzwrite
Binary-safe gz-file write
说明
int<span
class="type">false gzwrite
( resource
$stream , <span
class="type">string $data [, <span
class="methodparam"><span
class="type">intnull
$length = null ] )
gzwrite writes the contents of data to
the given gz-file.
参数
stream
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen.
data
The string to write.
length
The number of uncompressed bytes to write. If supplied, writing will
stop after length (uncompressed) bytes have been written or the end of
data is reached, whichever comes first.
Note:
Note that if the
lengthargument is given, then the magic_quotes_runtime configuration option will be ignored and no slashes will be stripped fromdata.
返回值
Returns the number of (uncompressed) bytes written to the given gz-file
stream, 或者在失败时返回 false.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | length is nullable now; previously, the default was 0. |
| 7.4.0 | This functions returns false on failure now; previously 0 was returned. |
范例
示例 #1 gzwrite example
<?php
$string = 'Some information to compress';
$gz = gzopen('somefile.gz','w9');
gzwrite($gz, $string);
gzclose($gz);
?>
参见
- gzread
- gzopen
inflate_add
Incrementally inflate encoded data
说明
string<span
class="type">false <span
class="methodname">inflate_add ( <span
class="type">InflateContext $context , <span
class="methodparam">string $data [,
int
$flush_mode =
ZLIB_SYNC_FLUSH ] )
Incrementally inflates encoded data in the specified context.
Limitation: header information from GZIP compressed data are not made available.
参数
context
A context created with inflate_init.
data
A chunk of compressed data.
flush_mode
One of ZLIB_BLOCK, ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH,
ZLIB_SYNC_FLUSH (default), ZLIB_FULL_FLUSH,
ZLIB_FINISH. Normally you will want to set ZLIB_NO_FLUSH to
maximize compression, and ZLIB_FINISH to terminate with the last
chunk of data. See the
» zlib manual
for a detailed description of these constants.
返回值
Returns a chunk of uncompressed data, 或者在失败时返回 false.
错误/异常
If invalid parameters are given, inflating the data requires a preset
dictionary, but none is specified, the compressed stream is corrupt or
has an invalid checksum, an error of level E_WARNING is generated.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | context expects an InflateContext instance now; previously, a resource was expected. |
参见
- inflate_init
inflate_get_read_len
Get number of bytes read so far
说明
int <span
class="methodname">inflate_get_read_len ( <span
class="methodparam">InflateContext
$context )
Warning
本函数还未编写文档,仅有参数列表。
参数
context
返回值
Returns number of bytes read so far 或者在失败时返回 false.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | context expects an InflateContext instance now; previously, a resource was expected. |
inflate_get_status
Get decompression status
说明
int <span
class="methodname">inflate_get_status ( <span
class="methodparam">InflateContext
$context )
Usually returns either ZLIB_OK or ZLIB_STREAM_END.
参数
context
返回值
Returns decompression status 或者在失败时返回 false.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | context expects an InflateContext instance now; previously, a resource was expected. |
inflate_init
Initialize an incremental inflate context
说明
InflateContext<span
class="type">false <span
class="methodname">inflate_init ( <span
class="methodparam">int $encoding [,
array
$options = [] ] )
Initialize an incremental inflate context with the specified encoding.
参数
encoding
One of the *`ZLIBENCODING`** constants.
options
An associative array which may contain the following elements:
level
The compression level in range -1..9; defaults to -1.
memory
The compression memory level in range 1..9; defaults to 8.
window
The zlib window size (logarithmic) in range 8..15; defaults to 15.
strategy
One of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE,
ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the default).
dictionary
A string or an array
of strings of the preset dictionary (default:
no preset dictionary).
返回值
Returns an inflate context resource (zlib.inflate) on success,
或者在失败时返回 false.
错误/异常
If an invalid encoding or option is passed to options, or the context
couldn't be created, an error of level E_WARNING is generated.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 | On success, this function returns an InflateContext instance now; previously, a resource was returned. |
参见
- inflate_add
- deflate_init
readgzfile
Output a gz-file
说明
int<span
class="type">false <span
class="methodname">readgzfile ( <span
class="type">string $filename [, <span
class="methodparam">int
$use_include_path = 0 ] )
Reads a file, decompresses it and writes it to standard output.
readgzfile can be used to read a file which is not in gzip format; in this case <span class="function">readgzfile will directly read from the file without decompression.
参数
filename
The file name. This file will be opened from the filesystem and its
contents written to standard output.
use_include_path
You can set this optional parameter to 1, if you want to search for
the file in the
include_path
too.
返回值
Returns the number of (uncompressed) bytes read from the file on
success, 或者在失败时返回 false
错误/异常
失败时抛出E_WARNING警告。
参见
- gzpassthru
- gzfile
- gzopen
zlib_decode
Uncompress any raw/gzip/zlib encoded data
说明
string<span
class="type">false <span
class="methodname">zlib_decode ( <span
class="type">string $data [, <span
class="methodparam">int $max_length<span
class="initializer"> = 0 ] )
Uncompress any raw/gzip/zlib encoded data.
Warning
本函数还未编写文档,仅有参数列表。
参数
data
max_length
返回值
Returns the uncompressed data, 或者在失败时返回 false.
参见
- zlib_encode
zlib_encode
Compress data with the specified encoding
说明
string<span
class="type">false <span
class="methodname">zlib_encode ( <span
class="type">string $data , <span
class="methodparam">int $encoding [,
int $level<span
class="initializer"> = -1 ] )
Compress data with the specified encoding.
Warning
本函数还未编写文档,仅有参数列表。
参数
data
The data to compress.
encoding
The compression algorithm. Either ZLIB_ENCODING_RAW,
ZLIB_ENCODING_DEFLATE or ZLIB_ENCODING_GZIP.
level
返回值
范例
示例 #1 zlib_encode example
<?php
$str = 'hello world';
$enc = zlib_encode($str, ZLIB_ENCODING_DEFLATE);
echo bin2hex($enc);
?>
以上例程会输出:
789ccb48cdc9c95728cf2fca4901001a0b045d
参见
- zlib_decode
zlib_get_coding_type
Returns the coding type used for output compression
说明
string<span class="type">false <span class="methodname">zlib_get_coding_type ( <span class="methodparam">void )
Returns the coding type used for output compression.
返回值
Possible return values are gzip, deflate, or false.
参见
- The zlib.output_compression directive
目录
- deflate_add — Incrementally deflate data
- deflate_init — Initialize an incremental deflate context
- 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 into 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 — 别名 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
- inflate_add — Incrementally inflate encoded data
- inflate_get_read_len — Get number of bytes read so far
- inflate_get_status — Get decompression status
- inflate_init — Initialize an incremental inflate context
- 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