Bug #15930 Updated: gzencode can't have a level
| From: | jbgagnon at apic dot fr | Date: | Thu, 07 Mar 2002 16:41:44 +0000 |
| Subject: | Bug #15930 Updated: gzencode can't have a level | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-1932@lists.php.net to get a copy of this message | ||
ID: 15930
Updated by: jbgagnon@apic.fr
-Summary: gzencode can't have a level
Reported By: jbgagnon@apic.fr
Status: Analyzed
Bug Type: Documentation problem
-Operating System: windows 200
+Operating System: windows 2000
PHP Version: 4.1.1
Assigned To: sr
New Comment:
YES, I use it. before I use gzopen($fic,"wb9"); with a temporary file
the compression was better than gzencode.
For passing information from serveur to client, the size of data is
very important. I prefer spending 20 ms for much compression than 30
sec more for download.
but if it is possible to change the Z_DEFAULT_COMPRESSION,
it's ok I always use the same (maxi) compression.
Previous Comments:
------------------------------------------------------------------------
[2002-03-07 10:50:54] sr@php.net
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 ...
------------------------------------------------------------------------
[2002-03-07 07:37:05] jbgagnon@apic.fr
<?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