ID: 15930 Updated by: [EMAIL PROTECTED] -Summary: gzencode can't have a level Reported By: [EMAIL PROTECTED] -Status: Open +Status: Analyzed -Bug Type: Zlib Related +Bug Type: Documentation problem Operating System: windows 200 PHP Version: 4.1.1 -Assigned To: +Assigned To: sr New Comment:
That's an error in the documentation. The optional second parameter doesn't set the compression level, it does set the compression mode, i.e. you can use FORCE_GZIP or FORCE_DEFLATE in order to use gzip/deflate compression. The compression level is always the default Z_DEFAULT_COMPRESSION. If nobody objects (does anybody use this parameter?) I'll fix the documentation ... Previous Comments: ------------------------------------------------------------------------ [2002-03-07 07:37:05] [EMAIL PROTECTED] <?php $data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; $gzdata = gzencode($data); echo strlen($gzdata),":ok<BR>"; $gzdata = gzencode($data,9); echo strlen($gzdata),":bad always 10<BR>"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15930&edit=1