jmcastagnetto           Wed Mar  7 00:36:02 2001 EDT

  Modified files:              
    /phpdoc     global.ent 
    /phpdoc/en/functions        zlib.xml 
  Log:
  Added documentation for gzdeflate/gzinflate/gzencode, fixed incorrect
  algorithm reference in gzcompress. Added urls for ZLIB, DEFLATE and GZIP.
  
  
Index: phpdoc/global.ent
diff -u phpdoc/global.ent:1.79 phpdoc/global.ent:1.80
--- phpdoc/global.ent:1.79      Tue Mar  6 08:31:22 2001
+++ phpdoc/global.ent   Wed Mar  7 00:36:01 2001
@@ -1,6 +1,6 @@
 <!-- -*- SGML -*-
 
- $Id: global.ent,v 1.79 2001/03/06 16:31:22 sniper Exp $
+ $Id: global.ent,v 1.80 2001/03/07 08:36:01 jmcastagnetto Exp $
 
  Contains global "macros" for all the SGML documents.
 
@@ -106,6 +106,9 @@
 <!ENTITY url.redhat.ccvs "http://www.redhat.com/products/ccvs">
 <!ENTITY url.redhat.support 
"http://www.redhat.com/products/ccvs/support/CCVS3.3docs/ProgPHP.html">
 <!ENTITY url.rfc  'http://www.faqs.org/rfcs/'>
+<!ENTITY url.rfc1950  'ftp://ftp.uu.net/pub/archiving/zip/doc/rfc1950.txt'>
+<!ENTITY url.rfc1951  'ftp://ftp.uu.net/pub/archiving/zip/doc/rfc1951.txt'>
+<!ENTITY url.rfc1952  'ftp://ftp.uu.net/pub/archiving/zip/doc/rfc1952.txt'>
 <!ENTITY url.sablotron "http://www.gingerall.com/">
 <!ENTITY url.sesam.de 
"http://its.siemens.de/lobs/its/techinf/oltp/sesam/manuals/index_gr.htm">
 <!ENTITY url.sesam.en 
"http://its.siemens.de/lobs/its/techinf/oltp/sesam/manuals/index_en.htm">
Index: phpdoc/en/functions/zlib.xml
diff -u phpdoc/en/functions/zlib.xml:1.10 phpdoc/en/functions/zlib.xml:1.11
--- phpdoc/en/functions/zlib.xml:1.10   Mon Jan 22 18:29:41 2001
+++ phpdoc/en/functions/zlib.xml        Wed Mar  7 00:36:01 2001
@@ -609,7 +609,7 @@
   <refentry id="function.gzcompress">
    <refnamediv>
     <refname>gzcompress</refname>
-    <refpurpose>Deflate a string</refpurpose>
+    <refpurpose>Compress a string</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
@@ -624,11 +624,16 @@
     </funcsynopsis>
     <para>
      This function returns a compressed version of the input
-     <parameter>data</parameter> using the deflate algorithm,
+     <parameter>data</parameter> using the ZLIB algorithm,
      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.
     </para>
+    <para>
+     For details on the ZLIB compression algorithm see the document
+     "<ulink url="&url.rfc1950;">ZLIB Compressed Data Format
+     Specification version 3.3</ulink>" (RFC 1950).
+    </para>
     <note>
      <para>
       This is <emphasis>not</emphasis> the same as gzip compression,
@@ -637,7 +642,10 @@
      </para>
     </note>
     <para>
-     See also <function>gzuncompress</function>.
+     See also <function>gzdeflate</function>,
+     <function>gzinflate</function>,
+     <function>gzuncompress</function>,
+     <function>gzencode</function>.
     </para>
    </refsect1>
   </refentry>
@@ -658,7 +666,7 @@
       </paramdef>
      </funcprototype>
     </funcsynopsis>
-    <para>                     
+    <para>   
      This function takes <parameter>data</parameter> compressed by
      <function>gzcompress</function> and returns the original
      uncompressed data or false on error.  The function will return an
@@ -667,7 +675,136 @@
      the optional parameter <parameter>length</parameter>.
     </para>
     <para>
+     See also <function>gzdeflate</function>, 
+     <function>gzinflate</function>,
+     <function>gzcompress</function>,
+     <function>gzencode</function>.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.gzdeflate">
+   <refnamediv>
+    <refname>gzdeflate</refname>
+    <refpurpose>Deflate a string</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>gzdeflate</function></funcdef>
+      <paramdef>string <parameter>data</parameter></paramdef>
+      <paramdef>int 
+       <parameter><optional>level</optional></parameter>
+      </paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     This function returns a compressed version of the input
+     <parameter>data</parameter> using the DEFLATE algorithm,
+     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.
+    </para>
+    <para>
+     For details on the DEFLATE compression algorithm see the document
+     "<ulink url="&url.rfc1951;">DEFLATE Compressed Data Format
+     Specification version 1.3</ulink>" (RFC 1951).
+    </para>
+    <para>
+     See also 
+     <function>gzinflate</function>,
+     <function>gzcompress</function>,
+     <function>gzuncompress</function>,
+     <function>gzencode</function>.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.gzinflate">
+   <refnamediv>
+    <refname>gzinflate</refname>
+    <refpurpose>Inflate a deflated string</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>gzinflate</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>gzdeflate</function> and returns the original
+     uncompressed data or false on error.  The function will return an
+     error if the uncompressed data is more than 256 times the length
+     of the compressed input <parameter>data</parameter> or more than
+     the optional parameter <parameter>length</parameter>.
+    </para>
+    <para>
+     See also <function>gzcompress</function>.
+     <function>gzuncompress</function>,
+     <function>gzdeflate</function>,
+     <function>gzencode</function>.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.gzencode">
+   <refnamediv>
+    <refname>gzencode</refname>
+    <refpurpose>Create a gzip compressed string</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>gzencode</function></funcdef>
+      <paramdef>string <parameter>data</parameter></paramdef>
+      <paramdef>int 
+       <parameter><optional>level</optional></parameter>
+      </paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <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.
+    </para>
+    <para>
+     The resulting data contains the appropriate headers and data
+     structure to make a standard .gz file, e.g.:
+     <example>
+      <title>Creating a gzip file</title>
+      <programlisting role="php">
+&lt;?php
+$data = implode("", "bigfile.txt");
+$gzdata = gzencode($data, 9);
+$fp = fopen("bigfile.txt.gz", "w");
+fwrite($fp, $gzdata);
+fclose($fp);
+?&gt;
+      </programlisting>
+     </example>
+    </para>
+    <para>
+     For more information on the GZIP file format, see the document:
+     <ulink url="&url.rfc1952">GZIP file format specification
+     version 4.3</ulink>.
+    </para>
+    <para>
      See also <function>gzcompress</function>.
+     <function>gzuncompress</function>,
+     <function>gzdeflate</function>,
+     <function>gzinflate</function>.
     </para>
    </refsect1>
   </refentry>


Reply via email to