1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Zip files</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GSF Reference Manual">
8 <link rel="up" href="parsers.html" title="Stream Parsers">
9 <link rel="prev" href="gsf-XML-and-libxml.html" title="XML and libxml">
10 <link rel="next" href="gsf-Compression.html" title="Compression">
11 <meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="gsf-XML-and-libxml.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="parsers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GSF Reference Manual</th>
21 <td><a accesskey="n" href="gsf-Compression.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gsf-Zip.synopsis" class="shortcut">Top</a>
26 <a href="#gsf-Zip.description" class="shortcut">Description</a>
28 <a href="#gsf-Zip.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gsf-Zip.properties" class="shortcut">Properties</a>
33 <div class="refentry" title="Zip files">
34 <a name="gsf-Zip"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="gsf-Zip.top_of_page"></a>Zip files</span></h2>
38 <p>Zip files — Utilities for reading and writing ZIP/JAR files</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv" title="Synopsis">
43 <a name="gsf-Zip.synopsis"></a><h2>Synopsis</h2>
44 <a name="GsfInfileZip"></a><a name="GsfOutfileZip"></a><pre class="synopsis"> <a class="link" href="gsf-Zip.html#GsfInfileZip-struct" title="GsfInfileZip">GsfInfileZip</a>;
45 <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * <a class="link" href="gsf-Zip.html#gsf-infile-zip-new" title="gsf_infile_zip_new ()">gsf_infile_zip_new</a> (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>,
46 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);
47 <a class="link" href="gsf-Zip.html#GsfOutfileZip-struct" title="GsfOutfileZip">GsfOutfileZip</a>;
48 <a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * <a class="link" href="gsf-Zip.html#gsf-outfile-zip-new" title="gsf_outfile_zip_new ()">gsf_outfile_zip_new</a> (<em class="parameter"><code><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *sink</code></em>,
49 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></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>
51 (<em class="parameter"><code><a class="link" href="gsf-Zip.html#GsfOutfileZip"><span class="type">GsfOutfileZip</span></a> *zip</code></em>,
52 <em class="parameter"><code><span class="type">GsfZipCompressionMethod</span> method</code></em>);
55 <div class="refsect1" title="Object Hierarchy">
56 <a name="gsf-Zip.object-hierarchy"></a><h2>Object Hierarchy</h2>
57 <pre class="synopsis">
58 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
59 +----<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
60 +----<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>
63 <pre class="synopsis">
64 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
65 +----<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>
66 +----<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a>
70 <div class="refsect1" title="Properties">
71 <a name="gsf-Zip.properties"></a><h2>Properties</h2>
72 <pre class="synopsis">
73 "<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"><span class="type">gint</span></a> : Read
74 "<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"><span class="type">GsfInfileZip</span></a>* : Write / Construct Only
75 "<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"><span class="type">GsfInput</span></a>* : Read / Write / Construct Only
76 "<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"><span class="type">gint</span></a> : Read / Write / Construct Only
77 "<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"><span class="type">gchar</span></a>* : Read / Write / Construct Only
78 "<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"><span class="type">GsfOutput</span></a>* : Read / Write / Construct Only
81 <div class="refsect1" title="Description">
82 <a name="gsf-Zip.description"></a><h2>Description</h2>
84 <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.
87 <div class="refsect1" title="Details">
88 <a name="gsf-Zip.details"></a><h2>Details</h2>
89 <div class="refsect2" title="GsfInfileZip">
90 <a name="GsfInfileZip-struct"></a><h3>GsfInfileZip</h3>
91 <pre class="programlisting">typedef struct _GsfInfileZip GsfInfileZip;</pre>
96 <div class="refsect2" title="gsf_infile_zip_new ()">
97 <a name="gsf-infile-zip-new"></a><h3>gsf_infile_zip_new ()</h3>
98 <pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * gsf_infile_zip_new (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>,
99 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
101 Opens the root directory of a Zip file.
103 <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
104 <h3 class="title">Note</h3>This adds a reference to <em class="parameter"><code>source</code></em>.</div>
107 <div class="variablelist"><table border="0">
108 <col align="left" valign="top">
111 <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
112 <td>A base <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>
116 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
117 <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>
121 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
122 <td> the new zip file handler
129 <div class="refsect2" title="GsfOutfileZip">
130 <a name="GsfOutfileZip-struct"></a><h3>GsfOutfileZip</h3>
131 <pre class="programlisting">typedef struct _GsfOutfileZip GsfOutfileZip;</pre>
136 <div class="refsect2" title="gsf_outfile_zip_new ()">
137 <a name="gsf-outfile-zip-new"></a><h3>gsf_outfile_zip_new ()</h3>
138 <pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * gsf_outfile_zip_new (<em class="parameter"><code><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *sink</code></em>,
139 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
141 Creates the root directory of a Zip file and manages the addition of
146 <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
147 <h3 class="title">Note</h3>This adds a reference to <em class="parameter"><code>sink</code></em>.</div>
150 <div class="variablelist"><table border="0">
151 <col align="left" valign="top">
154 <td><p><span class="term"><em class="parameter"><code>sink</code></em> :</span></p></td>
155 <td>a <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> to hold the ZIP file
159 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
160 <td>Location to store error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; currently unused.
164 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
165 <td> the new zip file handler
172 <div class="refsect2" title="gsf_outfile_zip_set_compression_method ()">
173 <a name="gsf-outfile-zip-set-compression-method"></a><h3>gsf_outfile_zip_set_compression_method ()</h3>
174 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gsf_outfile_zip_set_compression_method
175 (<em class="parameter"><code><a class="link" href="gsf-Zip.html#GsfOutfileZip"><span class="type">GsfOutfileZip</span></a> *zip</code></em>,
176 <em class="parameter"><code><span class="type">GsfZipCompressionMethod</span> method</code></em>);</pre>
179 <div class="variablelist"><table border="0">
180 <col align="left" valign="top">
183 <td><p><span class="term"><em class="parameter"><code>zip</code></em> :</span></p></td>
188 <td><p><span class="term"><em class="parameter"><code>method</code></em> :</span></p></td>
193 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
201 <div class="refsect1" title="Property Details">
202 <a name="gsf-Zip.property-details"></a><h2>Property Details</h2>
203 <div class="refsect2" title='The "compression-level" property'>
204 <a name="GsfInfileZip--compression-level"></a><h3>The <code class="literal">"compression-level"</code> property</h3>
205 <pre class="programlisting"> "compression-level" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read</pre>
206 <p>The level of compression used, zero meaning none.</p>
207 <p>Allowed values: [0,10]</p>
208 <p>Default value: 0</p>
211 <div class="refsect2" title='The "internal-parent" property'>
212 <a name="GsfInfileZip--internal-parent"></a><h3>The <code class="literal">"internal-parent"</code> property</h3>
213 <pre class="programlisting"> "internal-parent" <a class="link" href="gsf-Zip.html#GsfInfileZip"><span class="type">GsfInfileZip</span></a>* : Write / Construct Only</pre>
214 <p>Internal use only.</p>
217 <div class="refsect2" title='The "source" property'>
218 <a name="GsfInfileZip--source"></a><h3>The <code class="literal">"source"</code> property</h3>
219 <pre class="programlisting"> "source" <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>* : Read / Write / Construct Only</pre>
220 <p>The archive being interpreted.</p>
223 <div class="refsect2" title='The "compression-level" property'>
224 <a name="GsfOutfileZip--compression-level"></a><h3>The <code class="literal">"compression-level"</code> property</h3>
225 <pre class="programlisting"> "compression-level" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> : Read / Write / Construct Only</pre>
226 <p>The level of compression used, zero meaning none.</p>
227 <p>Allowed values: [0,10]</p>
228 <p>Default value: 8</p>
231 <div class="refsect2" title='The "entry-name" property'>
232 <a name="GsfOutfileZip--entry-name"></a><h3>The <code class="literal">"entry-name"</code> property</h3>
233 <pre class="programlisting"> "entry-name" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
234 <p>The filename of this member in the archive without path.</p>
235 <p>Default value: NULL</p>
238 <div class="refsect2" title='The "sink" property'>
239 <a name="GsfOutfileZip--sink"></a><h3>The <code class="literal">"sink"</code> property</h3>
240 <pre class="programlisting"> "sink" <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a>* : Read / Write / Construct Only</pre>
241 <p>Where the archive is written.</p>
247 Generated by GTK-Doc V1.14</div>