Date: 05/30/98
- Next message: sr: "[PHP-DEV] CVS update: php31/main"
- Previous message: Jan Legenhausen: "[PHP-DEV] Re: PHP3 once again - latest cvs-version [FIXED]"
- Next in thread: jim: "[PHP-DEV] CVS update: php3/doc/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Saturday May 30, 1998 @ 7:06
Author: sr
Update of /repository/php3/doc/functions
In directory asf:/tmp/cvs-serv1322/doc/functions
Modified Files:
zlib.sgml
Log Message:
Added Torben's documentation for fwrite()/fread() to zlib.sgml as gzwrite()/gzread().
Index: php3/doc/functions/zlib.sgml
diff -c php3/doc/functions/zlib.sgml:1.3 php3/doc/functions/zlib.sgml:1.4
*** php3/doc/functions/zlib.sgml:1.3 Tue May 19 06:10:05 1998
--- php3/doc/functions/zlib.sgml Sat May 30 07:06:12 1998
***************
*** 243,263 ****
<funcdef>int <function>gzputs</function></funcdef>
<paramdef>int <parameter>zp</parameter></paramdef>
<paramdef>string <parameter>str</parameter></paramdef>
</funcsynopsis>
- <para>
- Writes str to the gz-file stream pointed to by zp.
<para>
! Returns the number of characters written, or false if an error
! occurs.
! <para> The file pointer must
! be valid, and must point to a file successfully opened by
! <function>gzopen</function>.
- <para> See also <function>gzgets</function> and
- <function>gzgetss</function>.
</refsect1>
</refentry>
--- 243,293 ----
<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>
</funcsynopsis>
<para>
! <function>gzputs</function> is an alias to
! <function>gzwrite</function>, and is identical in every way.
! </refsect1>
! </refentry>
+ <refentry id="function.gzread">
+ <refnamediv>
+ <refname>gzread</refname>
+ <refpurpose>Binary-safe gz-file read</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>string <function>gzread</function></funcdef>
+ <paramdef>int <parameter>zp</parameter></paramdef>
+ <paramdef>int <parameter>length</parameter></paramdef>
+ </funcsynopsis>
+ <simpara>
+ <function>gzread</function> reads up to
+ <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.
+
+ <para>
+ <informalexample>
+ <programlisting>
+ // 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 );
+ </programlisting>
+ </informalexample>
+
+ <simpara>
+ See also <function>gzwrite</function>, <function>gzopen</function>,
+ <function>gzgets</function>, <function>gzgetss</function>,
+ <function>gzfile</function>, and <function>gzpassthru</function>.
</refsect1>
</refentry>
***************
*** 375,380 ****
--- 405,445 ----
</refsect1>
</refentry>
+
+ <refentry id="function.gzwrite">
+ <refnamediv>
+ <refname>gzwrite</refname>
+ <refpurpose>Binary-safe gz-file write</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <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>
+ </funcsynopsis>
+ <simpara>
+ <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>
+ Note that if the <parameter>length</parameter> argument is given,
+ 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>
+ See also <function>gzread</function>, <function>gzopen</function>,
+ and <function>gzputs</function>.
+ </refsect1>
+ </refentry>
</reference>
- Next message: sr: "[PHP-DEV] CVS update: php31/main"
- Previous message: Jan Legenhausen: "[PHP-DEV] Re: PHP3 once again - latest cvs-version [FIXED]"
- Next in thread: jim: "[PHP-DEV] CVS update: php3/doc/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

