php-doc-en/reference/bzip2/functions/bzdecompress.xml
Christoph Michael Becker c564dbc4f3 Generate bz2 methodsynopses based on stubs
Based on a patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351552 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-23 22:23:06 +00:00

133 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.bzdecompress" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>bzdecompress</refname>
<refpurpose>Decompresses bzip2 encoded data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>int</type><type>false</type></type><methodname>bzdecompress</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>use_less_memory</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
<function>bzdecompress</function> decompresses the given string containing
bzip2 encoded data.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
The string to decompress.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>use_less_memory</parameter></term>
<listitem>
<para>
If &true;, an alternative decompression algorithm will be used which
uses less memory (the maximum memory requirement drops to around 2300K)
but works at roughly half the speed.
</para>
<para>
See the <link xlink:href="&url.bzip2;">bzip2 documentation</link> for more
information about this feature.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The decompressed string, or &false; or an error number if an error occurred.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
The type of <parameter>use_less_memory</parameter> has been changed from
<type>int</type> to <type>bool</type>. Previously, the default value was
<literal>0</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Decompressing a String</title>
<programlisting role="php">
<![CDATA[
<?php
$start_str = "This is not an honest face?";
$bzstr = bzcompress($start_str);
echo "Compressed String: ";
echo $bzstr;
echo "\n<br />\n";
$str = bzdecompress($bzstr);
echo "Decompressed String: ";
echo $str;
echo "\n<br />\n";
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>bzcompress</function></member>
</simplelist>
</para>
</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:"~/.phpdoc/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
-->