-
Notifications
You must be signed in to change notification settings - Fork 56
/
gzopen.xml
122 lines (122 loc) · 3.98 KB
/
gzopen.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 02ba67b51f2bde571b6ce07026e935f4e81019af Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xml:id="function.gzopen" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>gzopen</refname>
<refpurpose>gz ファイルを開く</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>resource</type><type>false</type></type><methodname>gzopen</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
読み込みもしくは書き込みのために gzip (.gz) ファイルをオープンします。
</para>
<para>
<function>gzopen</function> は、gzip
フォーマットでないファイルの読み込みについても使用することができます。
この場合、<function>gzread</function>は、ファイルを解凍せずに直接読み
込まれます。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
ファイル名を指定します
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
<function>fopen</function> と同じ (<literal>rb</literal> または
<literal>wb</literal>) ですが、
圧縮レベル (<literal>wb9</literal>) または圧縮の方策、
つまり、<literal>wb6f</literal> のようにフィルターを通したデータを
<literal>f</literal> で指定したり、<literal>h</literal>
でハフマン圧縮のみを行うことを指定したりすることができます
(方策に関するパラメータの詳細については、<filename>zlib.h</filename>
の中の <literal>deflateInit2</literal> の説明を参照ください)。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>use_include_path</parameter></term>
<listitem>
<para>
このオプションパラメータを <literal>1</literal> にすることにより、
<link linkend="ini.include-path">include_path</link>にあるファイルも
検索することができます。
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
オープンしたファイルへのファイルポインタを返します。その後、
このファイルディスクプリタから読み込んだ全ては透過的に解凍され、
書き込んだものは圧縮されます。
</para>
<para>
オープンに失敗した場合、この関数は &false; を返します。
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>gzopen</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
$fp = gzopen("/tmp/file.gz", "r");
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>gzclose</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
-->