| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>Zip files: GSF Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 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.34.0 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 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="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#gsf-Zip.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#gsf-Zip.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> |
| 20 |
<a href="#gsf-Zip.properties" class="shortcut">Properties</a></span> |
| 21 |
</td> |
| 22 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 23 |
<td><a accesskey="u" href="parsers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 24 |
<td><a accesskey="p" href="gsf-XML-and-libxml.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 25 |
<td><a accesskey="n" href="gsf-Compression.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 26 |
</tr></table> |
| 27 |
<div class="refentry"> |
| 28 |
<a name="gsf-Zip"></a><div class="titlepage"></div> |
| 29 |
<div class="refnamediv"><table width="100%"><tr> |
| 30 |
<td valign="top"> |
| 31 |
<h2><span class="refentrytitle"><a name="gsf-Zip.top_of_page"></a>Zip files</span></h2> |
| 32 |
<p>Zip files — Utilities for reading and writing ZIP/JAR files</p> |
| 33 |
</td> |
| 34 |
<td class="gallery_image" valign="top" align="right"></td> |
| 35 |
</tr></table></div> |
| 36 |
<div class="refsect1"> |
| 37 |
<a name="gsf-Zip.functions"></a><h2>Functions</h2> |
| 38 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 39 |
<colgroup> |
| 40 |
<col width="150px" class="functions_proto_type"> |
| 41 |
<col class="functions_proto_name"> |
| 42 |
</colgroup> |
| 43 |
<tbody> |
| 44 |
<tr> |
| 45 |
<td class="function_type"> |
| 46 |
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 47 |
</td> |
| 48 |
<td class="function_name"> |
| 49 |
<a class="link" href="gsf-Zip.html#gsf-infile-zip-new" title="gsf_infile_zip_new ()">gsf_infile_zip_new</a> <span class="c_punctuation">()</span> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td class="function_type"> |
| 54 |
<a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 55 |
</td> |
| 56 |
<td class="function_name"> |
| 57 |
<a class="link" href="gsf-Zip.html#gsf-outfile-zip-new" title="gsf_outfile_zip_new ()">gsf_outfile_zip_new</a> <span class="c_punctuation">()</span> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<tr> |
| 61 |
<td class="function_type"> |
| 62 |
<span class="returnvalue">gboolean</span> |
| 63 |
</td> |
| 64 |
<td class="function_name"> |
| 65 |
<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> <span class="c_punctuation">()</span> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
</tbody> |
| 69 |
</table></div> |
| 70 |
</div> |
| 71 |
<div class="refsect1"> |
| 72 |
<a name="gsf-Zip.properties"></a><h2>Properties</h2> |
| 73 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 74 |
<colgroup> |
| 75 |
<col width="150px" class="properties_type"> |
| 76 |
<col width="300px" class="properties_name"> |
| 77 |
<col width="200px" class="properties_flags"> |
| 78 |
</colgroup> |
| 79 |
<tbody> |
| 80 |
<tr> |
| 81 |
<td class="property_type"><span class="type">int</span></td> |
| 82 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfInfileZip--compression-level" title="The “compression-level” property">compression-level</a></td> |
| 83 |
<td class="property_flags">Read</td> |
| 84 |
</tr> |
| 85 |
<tr> |
| 86 |
<td class="property_type"> |
| 87 |
<a class="link" href="gsf-Zip.html#GsfInfileZip"><span class="type">GsfInfileZip</span></a> *</td> |
| 88 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfInfileZip--internal-parent" title="The “internal-parent” property">internal-parent</a></td> |
| 89 |
<td class="property_flags">Write / Construct Only</td> |
| 90 |
</tr> |
| 91 |
<tr> |
| 92 |
<td class="property_type"> |
| 93 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *</td> |
| 94 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfInfileZip--source" title="The “source” property">source</a></td> |
| 95 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 96 |
</tr> |
| 97 |
<tr> |
| 98 |
<td class="property_type"><span class="type">gboolean</span></td> |
| 99 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfInfileZip--zip64" title="The “zip64” property">zip64</a></td> |
| 100 |
<td class="property_flags">Read</td> |
| 101 |
</tr> |
| 102 |
<tr> |
| 103 |
<td class="property_type"><span class="type">int</span></td> |
| 104 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip--compression-level" title="The “compression-level” property">compression-level</a></td> |
| 105 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 106 |
</tr> |
| 107 |
<tr> |
| 108 |
<td class="property_type"><span class="type">int</span></td> |
| 109 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip--deflate-level" title="The “deflate-level” property">deflate-level</a></td> |
| 110 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 111 |
</tr> |
| 112 |
<tr> |
| 113 |
<td class="property_type"> |
| 114 |
<span class="type">char</span> *</td> |
| 115 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip--entry-name" title="The “entry-name” property">entry-name</a></td> |
| 116 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 117 |
</tr> |
| 118 |
<tr> |
| 119 |
<td class="property_type"> |
| 120 |
<a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *</td> |
| 121 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip--sink" title="The “sink” property">sink</a></td> |
| 122 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 123 |
</tr> |
| 124 |
<tr> |
| 125 |
<td class="property_type"><span class="type">int</span></td> |
| 126 |
<td class="property_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip--zip64" title="The “zip64” property">zip64</a></td> |
| 127 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 128 |
</tr> |
| 129 |
</tbody> |
| 130 |
</table></div> |
| 131 |
</div> |
| 132 |
<a name="GsfInfileZip"></a><a name="GsfOutfileZip"></a><div class="refsect1"> |
| 133 |
<a name="gsf-Zip.other"></a><h2>Types and Values</h2> |
| 134 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 135 |
<colgroup> |
| 136 |
<col width="150px" class="other_proto_type"> |
| 137 |
<col class="other_proto_name"> |
| 138 |
</colgroup> |
| 139 |
<tbody> |
| 140 |
<tr> |
| 141 |
<td class="datatype_keyword"> </td> |
| 142 |
<td class="function_name"><a class="link" href="gsf-Zip.html#GsfInfileZip-struct" title="GsfInfileZip">GsfInfileZip</a></td> |
| 143 |
</tr> |
| 144 |
<tr> |
| 145 |
<td class="datatype_keyword"> </td> |
| 146 |
<td class="function_name"><a class="link" href="gsf-Zip.html#GsfOutfileZip-struct" title="GsfOutfileZip">GsfOutfileZip</a></td> |
| 147 |
</tr> |
| 148 |
</tbody> |
| 149 |
</table></div> |
| 150 |
</div> |
| 151 |
<div class="refsect1"> |
| 152 |
<a name="gsf-Zip.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 153 |
<pre class="screen"> GObject |
| 154 |
<span class="lineart">├──</span> <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> |
| 155 |
<span class="lineart">│</span> <span class="lineart">╰──</span> <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> |
| 156 |
<span class="lineart">│</span> <span class="lineart">╰──</span> GsfInfileZip |
| 157 |
<span class="lineart">╰──</span> <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> |
| 158 |
<span class="lineart">╰──</span> <a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> |
| 159 |
<span class="lineart">╰──</span> GsfOutfileZip |
| 160 |
</pre> |
| 161 |
</div> |
| 162 |
<div class="refsect1"> |
| 163 |
<a name="gsf-Zip.description"></a><h2>Description</h2> |
| 164 |
<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> |
| 165 |
</div> |
| 166 |
<div class="refsect1"> |
| 167 |
<a name="gsf-Zip.functions_details"></a><h2>Functions</h2> |
| 168 |
<div class="refsect2"> |
| 169 |
<a name="gsf-infile-zip-new"></a><h3>gsf_infile_zip_new ()</h3> |
| 170 |
<pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 171 |
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>, |
| 172 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 173 |
<p>Opens the root directory of a Zip file.</p> |
| 174 |
<div class="note">This adds a reference to <em class="parameter"><code>source</code></em>.</div> |
| 175 |
<div class="refsect3"> |
| 176 |
<a name="gsf-infile-zip-new.parameters"></a><h4>Parameters</h4> |
| 177 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 178 |
<colgroup> |
| 179 |
<col width="150px" class="parameters_name"> |
| 180 |
<col class="parameters_description"> |
| 181 |
<col width="200px" class="parameters_annotations"> |
| 182 |
</colgroup> |
| 183 |
<tbody> |
| 184 |
<tr> |
| 185 |
<td class="parameter_name"><p>source</p></td> |
| 186 |
<td class="parameter_description"><p>A base <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a></p></td> |
| 187 |
<td class="parameter_annotations"> </td> |
| 188 |
</tr> |
| 189 |
<tr> |
| 190 |
<td class="parameter_name"><p>err</p></td> |
| 191 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 192 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 193 |
</tr> |
| 194 |
</tbody> |
| 195 |
</table></div> |
| 196 |
</div> |
| 197 |
<div class="refsect3"> |
| 198 |
<a name="gsf-infile-zip-new.returns"></a><h4>Returns</h4> |
| 199 |
<p> the new zip file handler</p> |
| 200 |
</div> |
| 201 |
</div> |
| 202 |
<hr> |
| 203 |
<div class="refsect2"> |
| 204 |
<a name="gsf-outfile-zip-new"></a><h3>gsf_outfile_zip_new ()</h3> |
| 205 |
<pre class="programlisting"><a class="link" href="gsf-Outfile-writing-structed-files.html#GsfOutfile"><span class="returnvalue">GsfOutfile</span></a> * |
| 206 |
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>, |
| 207 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 208 |
<p>Creates the root directory of a Zip file and manages the addition of |
| 209 |
children.</p> |
| 210 |
<div class="note">This adds a reference to <em class="parameter"><code>sink</code></em>.</div> |
| 211 |
<div class="refsect3"> |
| 212 |
<a name="gsf-outfile-zip-new.parameters"></a><h4>Parameters</h4> |
| 213 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 214 |
<colgroup> |
| 215 |
<col width="150px" class="parameters_name"> |
| 216 |
<col class="parameters_description"> |
| 217 |
<col width="200px" class="parameters_annotations"> |
| 218 |
</colgroup> |
| 219 |
<tbody> |
| 220 |
<tr> |
| 221 |
<td class="parameter_name"><p>sink</p></td> |
| 222 |
<td class="parameter_description"><p>a <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> to hold the ZIP file</p></td> |
| 223 |
<td class="parameter_annotations"> </td> |
| 224 |
</tr> |
| 225 |
<tr> |
| 226 |
<td class="parameter_name"><p>err</p></td> |
| 227 |
<td class="parameter_description"><p>Location to store error, or <code class="literal">NULL</code>; currently unused.</p></td> |
| 228 |
<td class="parameter_annotations"> </td> |
| 229 |
</tr> |
| 230 |
</tbody> |
| 231 |
</table></div> |
| 232 |
</div> |
| 233 |
<div class="refsect3"> |
| 234 |
<a name="gsf-outfile-zip-new.returns"></a><h4>Returns</h4> |
| 235 |
<p> the new zip file handler</p> |
| 236 |
</div> |
| 237 |
</div> |
| 238 |
<hr> |
| 239 |
<div class="refsect2"> |
| 240 |
<a name="gsf-outfile-zip-set-compression-method"></a><h3>gsf_outfile_zip_set_compression_method ()</h3> |
| 241 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 242 |
gsf_outfile_zip_set_compression_method |
| 243 |
(<em class="parameter"><code><a class="link" href="gsf-Zip.html#GsfOutfileZip"><span class="type">GsfOutfileZip</span></a> *zip</code></em>, |
| 244 |
<em class="parameter"><code><span class="type">GsfZipCompressionMethod</span> method</code></em>);</pre> |
| 245 |
</div> |
| 246 |
</div> |
| 247 |
<div class="refsect1"> |
| 248 |
<a name="gsf-Zip.other_details"></a><h2>Types and Values</h2> |
| 249 |
<div class="refsect2"> |
| 250 |
<a name="GsfInfileZip-struct"></a><h3>GsfInfileZip</h3> |
| 251 |
<pre class="programlisting">typedef struct _GsfInfileZip GsfInfileZip;</pre> |
| 252 |
</div> |
| 253 |
<hr> |
| 254 |
<div class="refsect2"> |
| 255 |
<a name="GsfOutfileZip-struct"></a><h3>GsfOutfileZip</h3> |
| 256 |
<pre class="programlisting">typedef struct _GsfOutfileZip GsfOutfileZip;</pre> |
| 257 |
</div> |
| 258 |
</div> |
| 259 |
<div class="refsect1"> |
| 260 |
<a name="gsf-Zip.property-details"></a><h2>Property Details</h2> |
| 261 |
<div class="refsect2"> |
| 262 |
<a name="GsfInfileZip--compression-level"></a><h3>The <code class="literal">“compression-level”</code> property</h3> |
| 263 |
<pre class="programlisting"> “compression-level” <span class="type">int</span></pre> |
| 264 |
<p>Controls the level of compression used for new members.</p> |
| 265 |
<p>Owner: GsfInfileZip</p> |
| 266 |
<p>Flags: Read</p> |
| 267 |
<p>Allowed values: [0,10]</p> |
| 268 |
<p>Default value: 0</p> |
| 269 |
</div> |
| 270 |
<hr> |
| 271 |
<div class="refsect2"> |
| 272 |
<a name="GsfInfileZip--internal-parent"></a><h3>The <code class="literal">“internal-parent”</code> property</h3> |
| 273 |
<pre class="programlisting"> “internal-parent” <a class="link" href="gsf-Zip.html#GsfInfileZip"><span class="type">GsfInfileZip</span></a> *</pre> |
| 274 |
<p>Internal use only.</p> |
| 275 |
<p>Owner: GsfInfileZip</p> |
| 276 |
<p>Flags: Write / Construct Only</p> |
| 277 |
</div> |
| 278 |
<hr> |
| 279 |
<div class="refsect2"> |
| 280 |
<a name="GsfInfileZip--source"></a><h3>The <code class="literal">“source”</code> property</h3> |
| 281 |
<pre class="programlisting"> “source” <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *</pre> |
| 282 |
<p>The archive being interpreted.</p> |
| 283 |
<p>Owner: GsfInfileZip</p> |
| 284 |
<p>Flags: Read / Write / Construct Only</p> |
| 285 |
</div> |
| 286 |
<hr> |
| 287 |
<div class="refsect2"> |
| 288 |
<a name="GsfInfileZip--zip64"></a><h3>The <code class="literal">“zip64”</code> property</h3> |
| 289 |
<pre class="programlisting"> “zip64” <span class="type">gboolean</span></pre> |
| 290 |
<p>Whether zip64 is being used.</p> |
| 291 |
<p>Owner: GsfInfileZip</p> |
| 292 |
<p>Flags: Read</p> |
| 293 |
<p>Default value: FALSE</p> |
| 294 |
</div> |
| 295 |
<hr> |
| 296 |
<div class="refsect2"> |
| 297 |
<a name="GsfOutfileZip--compression-level"></a><h3>The <code class="literal">“compression-level”</code> property</h3> |
| 298 |
<pre class="programlisting"> “compression-level” <span class="type">int</span></pre> |
| 299 |
<p>The level of compression used, zero meaning none.</p> |
| 300 |
<p>Owner: GsfOutfileZip</p> |
| 301 |
<p>Flags: Read / Write / Construct Only</p> |
| 302 |
<p>Allowed values: [0,10]</p> |
| 303 |
<p>Default value: 8</p> |
| 304 |
</div> |
| 305 |
<hr> |
| 306 |
<div class="refsect2"> |
| 307 |
<a name="GsfOutfileZip--deflate-level"></a><h3>The <code class="literal">“deflate-level”</code> property</h3> |
| 308 |
<pre class="programlisting"> “deflate-level” <span class="type">int</span></pre> |
| 309 |
<p>The level of deflate compression used, zero meaning none and -1 meaning the zlib default.</p> |
| 310 |
<p>Owner: GsfOutfileZip</p> |
| 311 |
<p>Flags: Read / Write / Construct Only</p> |
| 312 |
<p>Allowed values: [-1,9]</p> |
| 313 |
<p>Default value: -1</p> |
| 314 |
</div> |
| 315 |
<hr> |
| 316 |
<div class="refsect2"> |
| 317 |
<a name="GsfOutfileZip--entry-name"></a><h3>The <code class="literal">“entry-name”</code> property</h3> |
| 318 |
<pre class="programlisting"> “entry-name” <span class="type">char</span> *</pre> |
| 319 |
<p>The filename of this member in the archive without path.</p> |
| 320 |
<p>Owner: GsfOutfileZip</p> |
| 321 |
<p>Flags: Read / Write / Construct Only</p> |
| 322 |
<p>Default value: NULL</p> |
| 323 |
</div> |
| 324 |
<hr> |
| 325 |
<div class="refsect2"> |
| 326 |
<a name="GsfOutfileZip--sink"></a><h3>The <code class="literal">“sink”</code> property</h3> |
| 327 |
<pre class="programlisting"> “sink” <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *</pre> |
| 328 |
<p>Where the archive is written.</p> |
| 329 |
<p>Owner: GsfOutfileZip</p> |
| 330 |
<p>Flags: Read / Write / Construct Only</p> |
| 331 |
</div> |
| 332 |
<hr> |
| 333 |
<div class="refsect2"> |
| 334 |
<a name="GsfOutfileZip--zip64"></a><h3>The <code class="literal">“zip64”</code> property</h3> |
| 335 |
<pre class="programlisting"> “zip64” <span class="type">int</span></pre> |
| 336 |
<p>Whether to use zip64 format, -1 meaning automatic.</p> |
| 337 |
<p>Owner: GsfOutfileZip</p> |
| 338 |
<p>Flags: Read / Write / Construct Only</p> |
| 339 |
<p>Allowed values: [-1,1]</p> |
| 340 |
<p>Default value: -1</p> |
| 341 |
</div> |
| 342 |
</div> |
| 343 |
</div> |
| 344 |
<div class="footer"> |
| 345 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 346 |
</body> |
| 347 |
</html> |