deflate_add
Description
The deflate_add of zlib for PHP incrementally deflates data.
Syntax
deflate_add( DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH ): string|false
Parameters
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, set ZLIB_NO_FLUSH to maximize compression and ZLIB_FINISH to terminate with the last chunk of data.
Return
Returns a chunk of compressed data, or false on failure.
Examples
1 · context data
<? $encoding = ZLIB_ENCODING_DEFLATE; $context = deflate_init($encoding); $data = "data"; $return = deflate_add($context, $data); echo $return; ?>
x�JI,I ��