From e47d027b6e9bd6b39171d16b7b15176e9d8d8831 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Mon, 1 Aug 2016 15:53:54 +0000 Subject: [PATCH] Fix #71505: Missing documentation about deflate_init() etc. Add the example. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339760 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/zlib/examples.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/reference/zlib/examples.xml b/reference/zlib/examples.xml index d554c93013..b043b00b46 100644 --- a/reference/zlib/examples.xml +++ b/reference/zlib/examples.xml @@ -49,6 +49,30 @@ echo "\n\n\n"; ]]> + + Working with the incremental compression and decompression API as of PHP 7.0.0 + + + +// Perform GZIP decompression: +$inflateContext = inflate_init(ZLIB_ENCODING_GZIP); +$uncompressed = inflate_add($inflateContext, $compressed, ZLIB_NO_FLUSH); +$uncompressed .= inflate_add($inflateContext, NULL, ZLIB_FINISH); +echo $uncompressed; +]]> + + &example.outputs; + + + +