[PHP-DOC] cvs: phpdoc /it/functions zlib.xml From: Luca Perugini (l.perugini <email protected>)
Date: 08/31/00

perugini Thu Aug 31 08:06:46 2000 EDT

  Modified files:
    /phpdoc/it/functions zlib.xml
  Log:
  Updated: synch with en tree.
  
  
Index: phpdoc/it/functions/zlib.xml
diff -u phpdoc/it/functions/zlib.xml:1.2 phpdoc/it/functions/zlib.xml:1.3
--- phpdoc/it/functions/zlib.xml:1.2 Sat Jun 24 00:38:44 2000
+++ phpdoc/it/functions/zlib.xml Thu Aug 31 08:06:46 2000
@@ -1,61 +1,72 @@
  <reference id="ref.zlib">
- <title>Compression functions</title>
+ <title>Zlib Compression Functions</title>
   <titleabbrev>Zlib</titleabbrev>
   <partintro>
   <para>
- This module uses the functions of <ulink url="&url.zlib;">zlib</ulink> by Jean-loup Gailly and Mark Adler to
+ This module uses the functions of <ulink
+ url="&url.zlib;">zlib</ulink> by Jean-loup Gailly and Mark Adler to
    transparently read and write gzip (.gz) compressed files. You have
    to use a zlib version >= 1.0.9 with this module.
   </para>
   <para>
- This module contains versions of most of the <link linkend="ref.filesystem">filesystem</link> functions which work
+ This module contains versions of most of the <link
+ linkend="ref.filesystem">filesystem</link> functions which work
    with gzip-compressed files (and uncompressed files, too, but not
    with sockets).
   </para>
 
    <sect1 id="zlib-example">
     <title>Small code example</title>
- <para>
- Opens a temporary file and writes a test string to it, then it
- prints out the content of this file twice.
- </para>
-
+ <para>
+ Opens a temporary file and writes a test string to it, then it
+ prints out the content of this file twice.
+ </para>
     <example>
- <title>Small Zlib example</title>
+ <title>Small Zlib Example</title>
 <programlisting role="php">
 &lt;?php
- $filename = tempnam('/tmp', 'zlibtest').'.gz';
- print "&lt;html>\n&lt;head>&lt;/head>\n&lt;body>\n&lt;pre>\n";
- $s = "Only a test, test, test, test, test, test, test, test!\n";
- // open file for writing with maximum compression
- $zp = gzopen($filename, "w9");
- // write string to file
- gzwrite($zp, $s);
- // close file
- gzclose($zp);
- // open file for reading
- $zp = gzopen($filename, "r");
- // read 3 char
- print gzread($zp, 3);
- // output until end of the file and close it.
- gzpassthru($zp);
- print "\n";
- // open file and print content (the 2nd time).
- if (readgzfile($filename) != strlen($s)) {
- echo "Error with zlib functions!";
- }
- unlink($filename);
- print "&lt;pre>\n&lt;/h1>&lt;/body>\n&lt;/html>\n";
-?>
-</programlisting>
- </example></sect1>
 
+$filename = tempnam ('/tmp', 'zlibtest').'.gz';
+print "&lt;html>\n&lt;head>&lt;/head>\n&lt;body>\n&lt;pre>\n";
+$s = "Only a test, test, test, test, test, test, test, test!\n";
+
+// open file for writing with maximum compression
+$zp = gzopen($filename, "w9");
+
+// write string to file
+gzwrite($zp, $s);
+
+// close file
+gzclose($zp);
+
+// open file for reading
+$zp = gzopen($filename, "r");
+
+// read 3 char
+print gzread($zp, 3);
+
+// output until end of the file and close it.
+gzpassthru($zp);
+
+print "\n";
+
+// open file and print content (the 2nd time).
+if (readgzfile($filename) != strlen($s)) {
+ echo "Error with zlib functions!";
+}
+unlink($filename);
+print "&lt;/pre>\n&lt;/h1>&lt;/body>\n&lt;/html>\n";
+
+?>
+ </programlisting>
+ </example>
+ </sect1>
   </partintro>
 
   <refentry id="function.gzclose">
    <refnamediv>
     <refname>gzclose</refname>
- <refpurpose>close an open gz-file pointer</refpurpose>
+ <refpurpose>Close an open gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -66,23 +77,22 @@
      </funcprototype>
     </funcsynopsis>
     <para>
- The gz-file pointed to by zp is closed.</para>
-
+ The gz-file pointed to by zp is closed.
+ </para>
     <para>
- Returns true on success and false on failure.</para>
-
+ Returns true on success and false on failure.
+ </para>
     <para>
      The gz-file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
+ successfully opened by <function>gzopen</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzeof">
    <refnamediv>
     <refname>gzeof</refname>
- <refpurpose>test for end-of-file on a gz-file pointer</refpurpose>
+ <refpurpose>Test for end-of-file on a gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -94,20 +104,19 @@
     </funcsynopsis>
     <para>
      Returns true if the gz-file pointer is at EOF or an error occurs;
- otherwise returns false.</para>
-
+ otherwise returns false.
+ </para>
     <para>
      The gz-file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
+ successfully opened by <function>gzopen</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzfile">
    <refnamediv>
- <refname>gzfile</refname> <refpurpose>read entire gz-file into an
- array</refpurpose>
+ <refname>gzfile</refname>
+ <refpurpose>Read entire gz-file into an array</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -115,26 +124,31 @@
      <funcprototype>
       <funcdef>array <function>gzfile</function></funcdef>
       <paramdef>string <parameter>filename</parameter></paramdef>
- <paramdef>int <parameter><optional>use_include_path</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>use_include_path</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
- <para> Identical to <function>readgzfile</function>, except that gzfile()
- returns the file in an array.</para>
-
+ <para>
+ Identical to <function>readgzfile</function>, except that
+ <function>gzfile</function> returns the file in an array.
+ </para>
     <para>
      You can use the optional second parameter and set it to "1", if
- you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too.</para>
-
- <para> See also <function>readgzfile</function>, and
- <function>gzopen</function>.</para>
+ you want to search for the file in the <link
+ linkend="ini.include-path">include_path</link>, too.
+ </para>
+ <para>
+ See also <function>readgzfile</function>, and
+ <function>gzopen</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzgetc">
    <refnamediv>
     <refname>gzgetc</refname>
- <refpurpose>get character from gz-file pointer</refpurpose>
+ <refpurpose>Get character from gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -147,23 +161,23 @@
     <para>
      Returns a string containing a single (uncompressed) character
      read from the file pointed to by zp. Returns FALSE on EOF (as
- does <function>gzeof</function>).</para>
+ does <function>gzeof</function>).
+ </para>
     <para>
      The gz-file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
- <para> See also
- <function>gzopen</function>, and
- <function>gzgets</function>.</para>
-
+ successfully opened by <function>gzopen</function>.
+ </para>
+ <para>
+ See also <function>gzopen</function>, and
+ <function>gzgets</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzgets">
    <refnamediv>
     <refname>gzgets</refname>
- <refpurpose>get line from file pointer</refpurpose>
+ <refpurpose>Get line from file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -174,29 +188,32 @@
       <paramdef>int <parameter>length</parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
-
     <para>
      Returns a (uncompressed) string of up to length - 1 bytes read
      from the file pointed to by fp. Reading ends when length - 1
      bytes have been read, on a newline, or on EOF (whichever comes
- first).</para>
-
- <para> If an error occurs, returns false.</para>
-
- <para> The file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
- <para> See also <function>gzopen</function>,
- <function>gzgetc</function>, and <function>fgets</function>.</para>
-
+ first).
+ </para>
+ <para>
+ If an error occurs, returns false.
+ </para>
+ <para>
+ The file pointer must be valid, and must point to a file
+ successfully opened by <function>gzopen</function>.
+ </para>
+ <para>
+ See also <function>gzopen</function>,
+ <function>gzgetc</function>, and <function>fgets</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzgetss">
    <refnamediv>
     <refname>gzgetss</refname>
- <refpurpose>get line from gz-file pointer and strip HTML tags</refpurpose>
+ <refpurpose>
+ Get line from gz-file pointer and strip HTML tags
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -205,34 +222,37 @@
       <funcdef>string <function>gzgetss</function></funcdef>
       <paramdef>int <parameter>zp</parameter></paramdef>
       <paramdef>int <parameter>length</parameter></paramdef>
- <paramdef>string <parameter><optional>allowable_tags</optional></parameter></paramdef>
+ <paramdef>string
+ <parameter><optional>allowable_tags</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
- Identical to <function>gzgets</function>,
- except that gzgetss attempts to strip any HTML and PHP tags from
- the text it reads.</para>
+ Identical to <function>gzgets</function>, except that
+ <function>gzgetss</function> attempts to strip any HTML and PHP
+ tags from the text it reads.
+ </para>
     <para>
      You can use the optional third parameter to specify tags which
      should not be stripped.
-
- <note>
- <para>
- <parameter>allowable_tags</parameter> was added in PHP 3.0.13, PHP4B3.</para>
- </note></para>
-
+ <note>
+ <para>
+ <parameter>Allowable_tags</parameter> was added in PHP 3.0.13,
+ PHP4B3.
+ </para>
+ </note>
+ </para>
     <para>
      See also <function>gzgets</function>,
- <function>gzopen</function>, and <function>strip_tags</function>.</para>
-
+ <function>gzopen</function>, and <function>strip_tags</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzopen">
    <refnamediv>
     <refname>gzopen</refname>
- <refpurpose>open gz-file</refpurpose>
+ <refpurpose>Open gz-file</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -241,7 +261,9 @@
       <funcdef>int <function>gzopen</function></funcdef>
       <paramdef>string <parameter>filename</parameter></paramdef>
       <paramdef>string <parameter>mode</parameter></paramdef>
- <paramdef>int <parameter><optional>use_include_path</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>use_include_path</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
@@ -250,42 +272,47 @@
      can also include a compression level ("wb9") or a strategy: 'f'
      for filtered data as in "wb6f", 'h' for Huffman only compression
      as in "wb1h". (See the description of deflateInit2 in zlib.h for
- more information about the strategy parameter.)</para>
-
- <para>
- Gzopen can be used to read a file which is not in gzip format; in
- this case <function>gzread</function> will directly read from the
- file without decompression.</para>
-
+ more information about the strategy parameter.)
+ </para>
     <para>
- Gzopen returns a file pointer to the file opened, after that,
- everything you read from this file descriptor will be
- transparently decompressed and what you write gets compressed.</para>
-
+ <function>Gzopen</function> can be used to read a file which is
+ not in gzip format; in this case <function>gzread</function> will
+ directly read from the file without decompression.
+ </para>
+ <para>
+ <function>Gzopen</function> returns a file pointer to the file
+ opened, after that, everything you read from this file descriptor
+ will be transparently decompressed and what you write gets
+ compressed.
+ </para>
     <para>
- If the open fails, the function returns false.</para>
-
+ If the open fails, the function returns false.
+ </para>
     <para>
      You can use the optional third parameter and set it to "1", if
- you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too.</para>
-
- <para><example>
- <title>gzopen() example</title>
- <programlisting>
-$fp = gzopen("/tmp/file.gz", "r");
-</programlisting></example></para>
-
+ you want to search for the file in the <link
+ linkend="ini.include-path">include_path</link>, too.
+ </para>
+ <para>
+ <example>
+ <title><function>Gzopen</function> Example</title>
+ <programlisting role="php">
+$fp = gzopen ("/tmp/file.gz", "r");
+ </programlisting>
+ </example>
+ </para>
     <para>
- See also <function>gzclose</function>.</para>
-
+ See also <function>gzclose</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzpassthru">
    <refnamediv>
     <refname>gzpassthru</refname>
- <refpurpose>output all remaining data on a gz-file pointer</refpurpose>
+ <refpurpose>
+ Output all remaining data on a gz-file pointer
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -297,27 +324,26 @@
     </funcsynopsis>
     <para>
      Reads to EOF on the given gz-file pointer and writes the
- (uncompressed) results to standard output.</para>
-
+ (uncompressed) results to standard output.
+ </para>
     <para>
- If an error occurs, returns false.</para>
-
+ If an error occurs, returns false.
+ </para>
     <para>
      The file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
+ successfully opened by <function>gzopen</function>.
+ </para>
     <para>
      The gz-file is closed when <function>gzpassthru</function> is
- done reading it (leaving <parameter>zp</parameter> useless).</para>
-
+ done reading it (leaving <parameter>zp</parameter> useless).
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzputs">
    <refnamediv>
     <refname>gzputs</refname>
- <refpurpose>write to a gz-file pointer</refpurpose>
+ <refpurpose>Write to a gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -326,18 +352,18 @@
       <funcdef>int <function>gzputs</function></funcdef>
       <paramdef>int <parameter>zp</parameter></paramdef>
       <paramdef>string <parameter>str</parameter></paramdef>
- <paramdef>int <parameter><optional>length</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>length</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
-
     <para>
- <function>gzputs</function> is an alias to
- <function>gzwrite</function>, and is identical in every way.</para>
-
+ <function>Gzputs</function> is an alias to
+ <function>gzwrite</function>, and is identical in every way.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzread">
    <refnamediv>
     <refname>gzread</refname>
@@ -357,31 +383,31 @@
      <parameter>length</parameter> bytes from the gz-file pointer
      referenced by <parameter>zp</parameter>. Reading stops when
      <parameter>length</parameter> (uncompressed) bytes have been read
- or EOF is reached, whichever comes first.</simpara>
-
+ or EOF is reached, whichever comes first.
+ </simpara>
     <para>
     <informalexample>
- <programlisting>
+ <programlisting role="php">
 // get contents of a gz-file into a string
 $filename = "/usr/local/something.txt.gz";
-$zd = gzopen( $filename, "r" );
-$contents = gzread( $zd, 10000 );
-gzclose( $zd );
+$zd = gzopen ($filename, "r");
+$contents = gzread ($zd, 10000);
+gzclose ($zd);
       </programlisting>
- </informalexample></para>
-
+ </informalexample>
+ </para>
     <simpara>
      See also <function>gzwrite</function>, <function>gzopen</function>,
      <function>gzgets</function>, <function>gzgetss</function>,
- <function>gzfile</function>, and <function>gzpassthru</function>.</simpara>
+ <function>gzfile</function>, and <function>gzpassthru</function>.
+ </simpara>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gzrewind">
    <refnamediv>
     <refname>gzrewind</refname>
- <refpurpose>rewind the position of a gz-file pointer</refpurpose>
+ <refpurpose>Rewind the position of a gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -391,21 +417,28 @@
       <paramdef>int <parameter>zp</parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
-<para> Sets the file position indicator for zp to the
- beginning of the file stream.</para>
- <para> If an error occurs, returns 0.</para>
- <para> The file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
- <para>
- See also <function>gzseek</function> and <function>gztell</function>.</para>
-
+ <para>
+ Sets the file position indicator for zp to the beginning of the
+ file stream.
+ </para>
+ <para>
+ If an error occurs, returns 0.
+ </para>
+ <para>
+ The file pointer must be valid, and must point to a file
+ successfully opened by <function>gzopen</function>.
+ </para>
+ <para>
+ See also <function>gzseek</function> and
+ <function>gztell</function>.
+ </para>
    </refsect1>
   </refentry>
 
   <refentry id="function.gzseek">
    <refnamediv>
     <refname>gzseek</refname>
- <refpurpose>seek on a gz-file pointer</refpurpose>
+ <refpurpose>Seek on a gz-file pointer</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -419,30 +452,29 @@
     <para>
      Sets the file position indicator for the file referenced by zp to
      offset bytes into the file stream. Equivalent to calling (in C)
- <literal>gzseek( zp, offset, SEEK_SET )</literal>.</para>
-
+ <literal>gzseek( zp, offset, SEEK_SET )</literal>.
+ </para>
     <para>
      If the file is opened for reading, this function is emulated but
      can be extremely slow. If the file is opened for writing, only
      forward seeks are supported; gzseek then compresses a sequence of
- zeroes up to the new starting position.</para>
-
+ zeroes up to the new starting position.
+ </para>
     <para>
      Upon success, returns 0; otherwise, returns -1. Note that seeking
- past EOF is not considered an error.</para>
-
+ past EOF is not considered an error.
+ </para>
     <para>
      See also <function>gztell</function> and
- <function>gzrewind</function>.</para>
-
+ <function>gzrewind</function>.
+ </para>
    </refsect1>
   </refentry>
 
-
   <refentry id="function.gztell">
    <refnamediv>
     <refname>gztell</refname>
- <refpurpose>tell gz-file pointer read/write position</refpurpose>
+ <refpurpose>Tell gz-file pointer read/write position</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -453,19 +485,21 @@
      </funcprototype>
     </funcsynopsis>
     <para>
- Returns the position of the file pointer referenced by zp; i.e.,
- its offset into the file stream.</para>
-
+ Returns the position of the file pointer referenced by
+ <parameter>zp</parameter>; i.e., its offset into the file
+ stream.
+ </para>
     <para>
- If an error occurs, returns false.</para>
-
+ If an error occurs, returns false.
+ </para>
     <para>
      The file pointer must be valid, and must point to a file
- successfully opened by <function>gzopen</function>.</para>
-
- <para> See also <function>gzopen</function>,
- <function>gzseek</function> and <function>gzrewind</function>.</para>
-
+ successfully opened by <function>gzopen</function>.
+ </para>
+ <para>
+ See also <function>gzopen</function>, <function>gzseek</function>
+ and <function>gzrewind</function>.
+ </para>
    </refsect1>
   </refentry>
 
@@ -481,34 +515,38 @@
       <funcdef>int <function>gzwrite</function></funcdef>
       <paramdef>int <parameter>zp</parameter></paramdef>
       <paramdef>string <parameter>string</parameter></paramdef>
- <paramdef>int <parameter><optional>length</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>length</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
     <simpara>
- <function>gzwrite</function> writes the contents of
+ <function>Gzwrite</function> writes the contents of
      <parameter>string</parameter> to the gz-file stream pointed to by
      <parameter>zp</parameter>. If the <parameter>length</parameter>
      argument is given, writing will stop after
      <parameter>length</parameter> (uncompressed) bytes have been
      written or the end of <parameter>string</parameter> is reached,
- whichever comes first.</simpara>
-
+ whichever comes first.
+ </simpara>
     <simpara>
      Note that if the <parameter>length</parameter> argument is given,
- then the <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>
+ then the <link
+ linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>
      configuration option will be ignored and no slashes will be
- stripped from <parameter>string</parameter>.</simpara>
-
+ stripped from <parameter>string</parameter>.
+ </simpara>
     <simpara>
      See also <function>gzread</function>, <function>gzopen</function>,
- and <function>gzputs</function>.</simpara>
+ and <function>gzputs</function>.
+ </simpara>
    </refsect1>
   </refentry>
 
   <refentry id="function.readgzfile">
    <refnamediv>
     <refname>readgzfile</refname>
- <refpurpose>output a gz-file</refpurpose>
+ <refpurpose>Output a gz-file</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -516,32 +554,98 @@
      <funcprototype>
       <funcdef>int <function>readgzfile</function></funcdef>
       <paramdef>string <parameter>filename</parameter></paramdef>
- <paramdef>int <parameter><optional>use_include_path</optional></parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>use_include_path</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Reads a file, decompresses it and writes it to standard
+ output.
+ </para>
+ <para>
+ <function>Readgzfile</function> can be used to read a file which
+ is not in gzip format; in this case
+ <function>readgzfile</function> will directly read from the file
+ without decompression.
+ </para>
+ <para>
+ Returns the number of (uncompressed) bytes read from the file. If
+ an error occurs, false is returned and unless the function was
+ called as <literal> <email protected></literal>, an error message is
+ printed.
+ </para>
+ <para>
+ The file <parameter>filename</parameter> will be opened from the
+ filesystem and its contents written to standard output.
+ </para>
+ <para>
+ You can use the optional second parameter and set it to "1", if
+ you want to search for the file in the <link
+ linkend="ini.include-path">include_path</link>, too.
+ </para>
+ <para>
+ See also <function>gzpassthru</function>,
+ <function>gzfile</function>, and <function>gzopen</function>.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="function.gzcompress">
+ <refnamediv>
+ <refname>gzcompress</refname>
+ <refpurpose>Gz-compress a string</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>string <function>gzcompress</function></funcdef>
+ <paramdef>string <parameter>data</parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>level</optional></parameter>
+ </paramdef>
      </funcprototype>
     </funcsynopsis>
- <para> Reads a file, decompresses it and writes it to standard
- output.</para>
-
     <para>
- Readgzfile() can be used to read a file which is not in gzip
- format; in this case readgzfile() will directly read from the
- file without decompression.</para>
-
- <para> Returns the number of (uncompressed) bytes read from the
- file. If an error occurs, false is returned and unless the
- function was called as  <email protected>, an error message is printed.</para>
-
- <para> The file <parameter>filename</parameter> will be opened
- from the filesystem and its contents written to standard output.</para>
-
+ This function returns a gzip-compressed version of the input
+ <parameter>data</parameter> or false on errors. The optional
+ parameter <parameter>level</parameter> can be given as 0 for no
+ compression up to 9 for maximum compression.
+ </para>
     <para>
- You can use the optional second parameter and set it to "1", if
- you want to search for the file in the <link linkend="ini.include-path">include_path</link>, too.</para>
+ See also <function>gzuncompress</function>.
+ </para>
+ </refsect1>
+ </refentry>
 
+ <refentry id="function.gzuncompress">
+ <refnamediv>
+ <refname>gzuncompress</refname>
+ <refpurpose>Uncompress a gz-compressed string</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>string <function>gzcompress</function></funcdef>
+ <paramdef>string <parameter>data</parameter></paramdef>
+ <paramdef>int
+ <parameter><optional>length</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ This function takes <parameter>data</parameter> compressed by
+ <function>gzcompress</function> and returns the orignial
+ uncompressed data or false on error. The function will return an
+ error if the uncompressed data is more than 256 times the lenght
+ of the compressed input <parameter>data</parameter> or more than
+ the optional parameter <parameter>length</parameter>.
+ </para>
     <para>
- See also <function>gzpassthru</function>,
- <function>gzfile</function>, and <function>gzopen</function>.</para>
-
+ See also <function>gzcompress</function>.
+ </para>
    </refsect1>
   </refentry>
 
@@ -557,7 +661,7 @@
 sgml-indent-step:1
 sgml-indent-data:t
 sgml-parent-document:nil
-sgml-default-dtd-file:"../manual.ced"
+sgml-default-dtd-file:"../../manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil