php-doc-en/reference/zlib/functions/gzread.xml
Mehdi Achour 391c25a6cf adding PHP tags in the examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@135250 c90b9560-bf6c-de11-be94-00142212c4b1
2003-07-16 17:25:02 +00:00

66 lines
2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 -->
<refentry id="function.gzread">
<refnamediv>
<refname>gzread</refname>
<refpurpose>Binary-safe gz-file read</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>gzread</methodname>
<methodparam><type>resource</type><parameter>zp</parameter></methodparam>
<methodparam><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<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.
</simpara>
<para>
<example>
<title><function>gzread</function> example</title>
<programlisting role="php">
<![CDATA[
<?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);
?>
]]>
</programlisting>
</example>
</para>
<simpara>
See also <function>gzwrite</function>, <function>gzopen</function>,
<function>gzgets</function>, <function>gzgetss</function>,
<function>gzfile</function>, and <function>gzpassthru</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->