note 110114 deleted from function.zlib-encode by cmb
| From: | cmb@php.net | Date: | Mon, 07 Nov 2016 15:44:09 +0000 |
| Subject: | note 110114 deleted from function.zlib-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207040@lists.php.net to get a copy of this message | ||
Note Submitter: soywiz at gmail dot com
----
RFC 1950 - zlib
RFC 1951 - raw deflate
RFC 1952 - gzip
The $encoding parameter referers to the window bits. So you can encode in several formats:
<?php
// RFC 1950 - zlib
$compressedData = zlib_encode($uncompressedData, 15);
// RFC 1951 - raw deflate
$compressedData = zlib_encode($uncompressedData, -15);
// RFC 1952 - gzip
$compressedData = zlib_encode($uncompressedData, 31);
?>