sr Wed Mar 13 17:35:05 2002 EDT
Modified files:
/phpdoc/en/functions zlib.xml
Log:
Added description of optional encoding_mode to gzencode().
Index: phpdoc/en/functions/zlib.xml
diff -u phpdoc/en/functions/zlib.xml:1.23 phpdoc/en/functions/zlib.xml:1.24
--- phpdoc/en/functions/zlib.xml:1.23 Tue Feb 5 13:23:12 2002
+++ phpdoc/en/functions/zlib.xml Wed Mar 13 17:35:05 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.23 $ -->
+<!-- $Revision: 1.24 $ -->
<reference id="ref.zlib">
<title>Zlib Compression Functions</title>
<titleabbrev>Zlib</titleabbrev>
@@ -715,15 +715,32 @@
<type>string</type><methodname>gzencode</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>level</parameter></methodparam>
+ <methodparam
+choice="opt"><type>int</type><parameter>encoding_mode</parameter></methodparam>
</methodsynopsis>
<para>
This function returns a compressed version of the input
- <parameter>data</parameter> compatible with the output of
- the <command>gzip</command> program,
- or &false; if an error is encountered. The optional parameter
- <parameter>level</parameter> can be given as 0 for no
- compression up to 9 for maximum compression, if not given
- the default compression level will be 1.
+ <parameter>data</parameter> compatible with the output of the
+ <command>gzip</command> program, or &false; if an error is
+ encountered. The optional parameter <parameter>level</parameter>
+ can be given as 0 for no compression up to 9 for maximum
+ compression, if not given the default compression level will be
+ the default compression level of the zlib library.
+ </para>
+ <para>
+ You can also give <constant>FORCE_GZIP</constant> (the default)
+ or <constant>FORCE_DEFLATE</constant> as optional third paramter
+ <parameter>encoding_mode</parameter>. If you use
+ <constant>FORCE_DEFLATE</constant>, you get a standard zlib
+ deflated string (inclusive zlib headers) after the gzip file
+ header but without the trailing crc32 checksum.
+ <note>
+ <para>
+ <parameter>level</parameter> was added in PHP 4.2, before PHP
+ 4.2 <function>gzencode</function> only had the
+ <parameter>data</parameter> and (optional)
+ <parameter>encoding_mode</parameter> parameters..
+ </para>
+ </note>
</para>
<para>
The resulting data contains the appropriate headers and data