<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP(5)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP(5)</td>
<td class="head-vol">File Formats Manual</td>
<td class="head-rtitle">ZIP(5)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">zip</code> — <span class="Nd">zip archive
structure</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
<p class="Pp">libzip (-lzip)</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">zip.h</a>></code></p>
<p class="Pp"><var class="Vt">zip_t *archive</var>;</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">A <code class="Nm">zip</code> represents an open zip archive and
is used for all functions accessing and modifying archives.</p>
<p class="Pp">It is created with
<a class="Xr" href="zip_open.html">zip_open(3)</a>,
<a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a>,
or <a class="Xr" href="zip_fdopen.html">zip_fdopen(3)</a>.</p>
<p class="Pp">It is closed with
<a class="Xr" href="zip_close.html">zip_close(3)</a> (keeping changes) or
<a class="Xr" href="zip_discard.html">zip_discard(3)</a> (discarding
changes).</p>
<p class="Pp">All objects representing parts of an archive (like
<var class="Vt">zip_file_t</var>) are only valid while the archive remains
open.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_close.html">zip_close(3)</a>,
<a class="Xr" href="zip_discard.html">zip_discard(3)</a>,
<a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>,
<a class="Xr" href="zip_open.html">zip_open(3)</a>,
<a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp"><span class="An">Dieter Baron</span>
<<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and
<span class="An">Thomas Klausner</span>
<<a class="Mt" href="mailto:wiz@gatalith.at">wiz@gatalith.at</a>></p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">May 5, 2025</td>
<td class="foot-os">NiH</td>
</tr>
</table>
</body>
</html>