File: gsf-Zip.html

package info (click to toggle)
libgsf 1.14.18-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,444 kB
  • ctags: 2,831
  • sloc: ansic: 19,500; sh: 10,358; xml: 7,504; makefile: 494; perl: 35; python: 13
file content (291 lines) | stat: -rw-r--r-- 15,115 bytes parent folder | download
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Zip files</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GSF Reference Manual">
<link rel="up" href="parsers.html" title="Stream Parsers">
<link rel="prev" href="gsf-XML-and-libxml.html" title="XML and libxml">
<link rel="next" href="gsf-Compression.html" title="Compression">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="intro.html" title="Part I. GSF: Introduction">
<link rel="part" href="history.html" title="Part II. GSF: History">
<link rel="part" href="dependencies.html" title="Part III. GSF: Dependencies">
<link rel="part" href="gsf-users.html" title="Part IV. Projects using GSF">
<link rel="part" href="api.html" title="Part V. API Reference">
<link rel="chapter" href="io.html" title="Basic Input/Output">
<link rel="chapter" href="sources.html" title="Stream Sources">
<link rel="chapter" href="parsers.html" title="Stream Parsers">
<link rel="chapter" href="misc.html" title="Miscellaneous">
<link rel="index" href="gsf-index.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gsf-XML-and-libxml.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="parsers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GSF Reference Manual</th>
<td><a accesskey="n" href="gsf-Compression.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gsf-Zip.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#gsf-Zip.description" class="shortcut">Description</a>
                 | 
                <a href="#gsf-Zip.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#gsf-Zip.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" title="Zip files">
<a name="gsf-Zip"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gsf-Zip.top_of_page"></a>Zip files</span></h2>
<p>Zip files — Utilities for reading and writing ZIP/JAR files</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="gsf-Zip.synopsis"></a><h2>Synopsis</h2>
<a name="GsfInfileZip"></a><a name="GsfOutfileZip"></a><pre class="synopsis">
                    <a class="link" href="gsf-Zip.html#GsfInfileZip-struct" title="GsfInfileZip">GsfInfileZip</a>;
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> *         <a class="link" href="gsf-Zip.html#gsf-infile-zip-new" title="gsf_infile_zip_new ()">gsf_infile_zip_new</a>                  (<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);
                    <a class="link" href="gsf-Zip.html#GsfOutfileZip-struct" title="GsfOutfileZip">GsfOutfileZip</a>;
<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> *        <a class="link" href="gsf-Zip.html#gsf-outfile-zip-new" title="gsf_outfile_zip_new ()">gsf_outfile_zip_new</a>                 (<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *sink,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="gsf-Zip.html#gsf-outfile-zip-set-compression-method" title="gsf_outfile_zip_set_compression_method ()">gsf_outfile_zip_set_compression_method</a>
                                                        (<a class="link" href="gsf-Zip.html#GsfOutfileZip">GsfOutfileZip</a> *zip,
                                                         GsfZipCompressionMethod method);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="gsf-Zip.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
         +----<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>
               +----GsfInfileZip
</pre>
<pre class="synopsis">
  <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>
         +----<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a>
               +----GsfOutfileZip
</pre>
</div>
<div class="refsect1" title="Properties">
<a name="gsf-Zip.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="gsf-Zip.html#GsfInfileZip--compression-level" title='The "compression-level" property'>compression-level</a>"        <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a class="link" href="gsf-Zip.html#GsfInfileZip--internal-parent" title='The "internal-parent" property'>internal-parent</a>"          <a class="link" href="gsf-Zip.html#GsfInfileZip">GsfInfileZip</a>*         : Write / Construct Only
  "<a class="link" href="gsf-Zip.html#GsfInfileZip--source" title='The "source" property'>source</a>"                   <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>*             : Read / Write / Construct Only
  "<a class="link" href="gsf-Zip.html#GsfOutfileZip--compression-level" title='The "compression-level" property'>compression-level</a>"        <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write / Construct Only
  "<a class="link" href="gsf-Zip.html#GsfOutfileZip--entry-name" title='The "entry-name" property'>entry-name</a>"               <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write / Construct Only
  "<a class="link" href="gsf-Zip.html#GsfOutfileZip--sink" title='The "sink" property'>sink</a>"                     <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>*            : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" title="Description">
<a name="gsf-Zip.description"></a><h2>Description</h2>
<p>
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> and <a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="type">GsfOutfile</span></a> support for zip files.</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="gsf-Zip.details"></a><h2>Details</h2>
<div class="refsect2" title="GsfInfileZip">
<a name="GsfInfileZip-struct"></a><h3>GsfInfileZip</h3>
<pre class="programlisting">typedef struct _GsfInfileZip GsfInfileZip;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="gsf_infile_zip_new ()">
<a name="gsf-infile-zip-new"></a><h3>gsf_infile_zip_new ()</h3>
<pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> *         gsf_infile_zip_new                  (<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);</pre>
<p>
Opens the root directory of a Zip file.
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This adds a reference to <em class="parameter"><code>source</code></em>.</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td> A base <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td> A <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
><span class="type">GError</span></a>, optionally <code class="literal">null</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the new zip file handler
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GsfOutfileZip">
<a name="GsfOutfileZip-struct"></a><h3>GsfOutfileZip</h3>
<pre class="programlisting">typedef struct _GsfOutfileZip GsfOutfileZip;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="gsf_outfile_zip_new ()">
<a name="gsf-outfile-zip-new"></a><h3>gsf_outfile_zip_new ()</h3>
<pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> *        gsf_outfile_zip_new                 (<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *sink,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **err);</pre>
<p>
Creates the root directory of a Zip file and manages the addition of
children.
</p>
<p>
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This adds a reference to <em class="parameter"><code>sink</code></em>.</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sink</code></em> :</span></p></td>
<td> a <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> to hold the ZIP file
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td> Location to store error, or <code class="literal">NULL</code>; currently unused.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the new zip file handler
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gsf_outfile_zip_set_compression_method ()">
<a name="gsf-outfile-zip-set-compression-method"></a><h3>gsf_outfile_zip_set_compression_method ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a>            gsf_outfile_zip_set_compression_method
                                                        (<a class="link" href="gsf-Zip.html#GsfOutfileZip">GsfOutfileZip</a> *zip,
                                                         GsfZipCompressionMethod method);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>zip</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>method</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="gsf-Zip.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "compression-level" property'>
<a name="GsfInfileZip--compression-level"></a><h3>The <code class="literal">"compression-level"</code> property</h3>
<pre class="programlisting">  "compression-level"        <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>The level of compression used, zero meaning none.</p>
<p>Allowed values: [0,10]</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" title='The "internal-parent" property'>
<a name="GsfInfileZip--internal-parent"></a><h3>The <code class="literal">"internal-parent"</code> property</h3>
<pre class="programlisting">  "internal-parent"          <a class="link" href="gsf-Zip.html#GsfInfileZip">GsfInfileZip</a>*         : Write / Construct Only</pre>
<p>Internal use only.</p>
</div>
<hr>
<div class="refsect2" title='The "source" property'>
<a name="GsfInfileZip--source"></a><h3>The <code class="literal">"source"</code> property</h3>
<pre class="programlisting">  "source"                   <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>*             : Read / Write / Construct Only</pre>
<p>The archive being interpreted.</p>
</div>
<hr>
<div class="refsect2" title='The "compression-level" property'>
<a name="GsfOutfileZip--compression-level"></a><h3>The <code class="literal">"compression-level"</code> property</h3>
<pre class="programlisting">  "compression-level"        <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write / Construct Only</pre>
<p>The level of compression used, zero meaning none.</p>
<p>Allowed values: [0,10]</p>
<p>Default value: 8</p>
</div>
<hr>
<div class="refsect2" title='The "entry-name" property'>
<a name="GsfOutfileZip--entry-name"></a><h3>The <code class="literal">"entry-name"</code> property</h3>
<pre class="programlisting">  "entry-name"               <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write / Construct Only</pre>
<p>The filename of this member in the archive without path.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" title='The "sink" property'>
<a name="GsfOutfileZip--sink"></a><h3>The <code class="literal">"sink"</code> property</h3>
<pre class="programlisting">  "sink"                     <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>*            : Read / Write / Construct Only</pre>
<p>Where the archive is written.</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>