mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@351625 c90b9560-bf6c-de11-be94-00142212c4b1
126 lines
3.6 KiB
XML
126 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 02ba67b51f2bde571b6ce07026e935f4e81019af Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry xml:id="function.gzcompress" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>gzcompress</refname>
|
|
<refpurpose>Compresse une chaîne</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>string</type><type>false</type></type><methodname>gzcompress</methodname>
|
|
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>level</parameter><initializer>-1</initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>encoding</parameter><initializer><constant>ZLIB_ENCODING_DEFLATE</constant></initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>gzcompress</function> compresse la chaîne donnée en utilisant
|
|
le format de données <literal>ZLIB</literal>.
|
|
</para>
|
|
<para>
|
|
Pour plus de détails sur l'algorithme, lisez le document
|
|
<link xlink:href="&url.rfc;1950"><literal>"ZLIB Compressed Data Format
|
|
Specification version 3.3"</literal></link> (RFC 1950).
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Ce n'est <emphasis>pas</emphasis> la même chose que la compression gzip,
|
|
qui inclut quelques en-têtes de données. Voir <function>gzencode</function>
|
|
pour la compression gzip.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>data</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La donnée à compresser.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>level</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le degré de compression. 0 signifie aucune compression, jusqu'à 9
|
|
pour une compression maximale.
|
|
</para>
|
|
<para>
|
|
Si ce paramètre vaut -1, la compression par défaut
|
|
de la bibliothèque zlib sera utilisée, soit 6.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>encoding</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Une constante <constant>ZLIB_ENCODING_*</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
La chaîne compressée ou &false; si une erreur survient.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>gzcompress</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$compressed = gzcompress('Compresse moi', 9);
|
|
echo $compressed;
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>gzdeflate</function></member>
|
|
<member><function>gzinflate</function></member>
|
|
<member><function>gzuncompress</function></member>
|
|
<member><function>gzencode</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
|
|
-->
|