head	1.22;
access;
symbols
	libarchive-3-8-7:1.1.1.23
	libarchive-3-8-6:1.1.1.22
	pkgsrc-2026Q1:1.20.0.2
	pkgsrc-2026Q1-base:1.20
	libarchive-3-8-5:1.1.1.21
	libarchive-3-8-4:1.1.1.20
	pkgsrc-2025Q4:1.18.0.2
	pkgsrc-2025Q4-base:1.18
	libarchive-3-8-3:1.1.1.19
	libarchive-3-8-2:1.1.1.18
	pkgsrc-2025Q3:1.16.0.2
	pkgsrc-2025Q3-base:1.16
	libarchive-3-8-1:1.1.1.17
	pkgsrc-2025Q2:1.15.0.2
	pkgsrc-2025Q2-base:1.15
	libarchive-3-8-0:1.1.1.16
	libarchive-3-7-9:1.1.1.15
	pkgsrc-2025Q1:1.13.0.4
	pkgsrc-2025Q1-base:1.13
	pkgsrc-2024Q4:1.13.0.2
	pkgsrc-2024Q4-base:1.13
	libarchive-3-7-7:1.1.1.14
	pkgsrc-2024Q3:1.12.0.2
	pkgsrc-2024Q3-base:1.12
	libarchive-3-7-5:1.1.1.13
	pkgsrc-2024Q2:1.11.0.2
	pkgsrc-2024Q2-base:1.11
	libarchive-3-7-4:1.1.1.12
	libarchive-3-7-3:1.1.1.11
	pkgsrc-2024Q1:1.9.0.2
	pkgsrc-2024Q1-base:1.9
	libarchive-3-7-2:1.1.1.10
	pkgsrc-2023Q4:1.8.0.30
	pkgsrc-2023Q4-base:1.8
	pkgsrc-2023Q3:1.8.0.28
	pkgsrc-2023Q3-base:1.8
	pkgsrc-2023Q2:1.8.0.26
	pkgsrc-2023Q2-base:1.8
	pkgsrc-2023Q1:1.8.0.24
	pkgsrc-2023Q1-base:1.8
	pkgsrc-2022Q4:1.8.0.22
	pkgsrc-2022Q4-base:1.8
	pkgsrc-2022Q3:1.8.0.20
	pkgsrc-2022Q3-base:1.8
	pkgsrc-2022Q2:1.8.0.18
	pkgsrc-2022Q2-base:1.8
	pkgsrc-2022Q1:1.8.0.16
	pkgsrc-2022Q1-base:1.8
	pkgsrc-2021Q4:1.8.0.14
	pkgsrc-2021Q4-base:1.8
	pkgsrc-2021Q3:1.8.0.12
	pkgsrc-2021Q3-base:1.8
	pkgsrc-2021Q2:1.8.0.10
	pkgsrc-2021Q2-base:1.8
	pkgsrc-2021Q1:1.8.0.8
	pkgsrc-2021Q1-base:1.8
	pkgsrc-2020Q4:1.8.0.6
	pkgsrc-2020Q4-base:1.8
	pkgsrc-2020Q3:1.8.0.4
	pkgsrc-2020Q3-base:1.8
	pkgsrc-2020Q2:1.8.0.2
	pkgsrc-2020Q2-base:1.8
	pkgsrc-2020Q1:1.7.0.4
	pkgsrc-2020Q1-base:1.7
	pkgsrc-2019Q4:1.7.0.6
	pkgsrc-2019Q4-base:1.7
	pkgsrc-2019Q3:1.7.0.2
	pkgsrc-2019Q3-base:1.7
	libarchive-3-4-0:1.1.1.9
	libarchive-3-3-3:1.1.1.8
	pkgsrc-2019Q2:1.6.0.2
	pkgsrc-2019Q2-base:1.6
	pkgsrc-2019Q1:1.5.0.16
	pkgsrc-2019Q1-base:1.5
	pkgsrc-2018Q4:1.5.0.14
	pkgsrc-2018Q4-base:1.5
	pkgsrc-2018Q3:1.5.0.12
	pkgsrc-2018Q3-base:1.5
	pkgsrc-2018Q2:1.5.0.10
	pkgsrc-2018Q2-base:1.5
	pkgsrc-2018Q1:1.5.0.8
	pkgsrc-2018Q1-base:1.5
	pkgsrc-2017Q4:1.5.0.6
	pkgsrc-2017Q4-base:1.5
	pkgsrc-2017Q3:1.5.0.4
	pkgsrc-2017Q3-base:1.5
	libarchive-3-3-2:1.1.1.7
	pkgsrc-2017Q2:1.4.0.4
	pkgsrc-2017Q2-base:1.4
	pkgsrc-2017Q1:1.4.0.2
	pkgsrc-2017Q1-base:1.4
	libarchive-3-3-1:1.1.1.6
	pkgsrc-2016Q4:1.3.0.6
	pkgsrc-2016Q4-base:1.3
	pkgsrc-2016Q3:1.3.0.4
	pkgsrc-2016Q3-base:1.3
	pkgsrc-2016Q2:1.3.0.2
	pkgsrc-2016Q2-base:1.3
	libarchive-3-2-1:1.1.1.5
	pkgsrc-2016Q1:1.2.0.10
	pkgsrc-2016Q1-base:1.2
	pkgsrc-2015Q4:1.2.0.8
	pkgsrc-2015Q4-base:1.2
	pkgsrc-2015Q3:1.2.0.6
	pkgsrc-2015Q3-base:1.2
	pkgsrc-2015Q2:1.2.0.4
	pkgsrc-2015Q2-base:1.2
	pkgsrc-2015Q1:1.2.0.2
	pkgsrc-2015Q1-base:1.2
	pkgsrc-2014Q4:1.1.1.4.0.36
	pkgsrc-2014Q4-base:1.1.1.4
	pkgsrc-2014Q3:1.1.1.4.0.34
	pkgsrc-2014Q3-base:1.1.1.4
	pkgsrc-2014Q2:1.1.1.4.0.32
	pkgsrc-2014Q2-base:1.1.1.4
	pkgsrc-2014Q1:1.1.1.4.0.30
	pkgsrc-2014Q1-base:1.1.1.4
	pkgsrc-2013Q4:1.1.1.4.0.28
	pkgsrc-2013Q4-base:1.1.1.4
	pkgsrc-2013Q3:1.1.1.4.0.26
	pkgsrc-2013Q3-base:1.1.1.4
	pkgsrc-2013Q2:1.1.1.4.0.24
	pkgsrc-2013Q2-base:1.1.1.4
	pkgsrc-2013Q1:1.1.1.4.0.22
	pkgsrc-2013Q1-base:1.1.1.4
	pkgsrc-2012Q4:1.1.1.4.0.20
	pkgsrc-2012Q4-base:1.1.1.4
	pkgsrc-2012Q3:1.1.1.4.0.18
	pkgsrc-2012Q3-base:1.1.1.4
	pkgsrc-2012Q2:1.1.1.4.0.16
	pkgsrc-2012Q2-base:1.1.1.4
	pkgsrc-2012Q1:1.1.1.4.0.14
	pkgsrc-2012Q1-base:1.1.1.4
	pkgsrc-2011Q4:1.1.1.4.0.12
	pkgsrc-2011Q4-base:1.1.1.4
	pkgsrc-2011Q3:1.1.1.4.0.10
	pkgsrc-2011Q3-base:1.1.1.4
	pkgsrc-2011Q2:1.1.1.4.0.8
	pkgsrc-2011Q2-base:1.1.1.4
	pkgsrc-2011Q1:1.1.1.4.0.6
	pkgsrc-2011Q1-base:1.1.1.4
	pkgsrc-2010Q4:1.1.1.4.0.4
	pkgsrc-2010Q4-base:1.1.1.4
	pkgsrc-2010Q3:1.1.1.4.0.2
	pkgsrc-2010Q3-base:1.1.1.4
	libarchive-2-8-4:1.1.1.4
	pkgsrc-2010Q2:1.1.1.3.0.4
	pkgsrc-2010Q2-base:1.1.1.3
	pkgsrc-2010Q1:1.1.1.3.0.2
	pkgsrc-2010Q1-base:1.1.1.3
	libarchive-2-8-3:1.1.1.3
	libarchive-2-8-2:1.1.1.2
	libarchive-2-8-0:1.1.1.1
	KIENTZLE:1.1.1;
locks; strict;
comment	@# @;


1.22
date	2026.04.15.08.46.34;	author adam;	state Exp;
branches;
next	1.21;
commitid	pL26mrnh4kOo62CG;

1.21
date	2026.03.26.11.20.06;	author adam;	state Exp;
branches;
next	1.20;
commitid	8pSUUUHFeJu1BtzG;

1.20
date	2026.01.06.11.55.22;	author adam;	state Exp;
branches;
next	1.19;
commitid	lOosf75XWhczkkpG;

1.19
date	2025.12.23.14.01.22;	author adam;	state Exp;
branches;
next	1.18;
commitid	3zKcl3VhUVXFtxnG;

1.18
date	2025.11.20.06.08.25;	author adam;	state Exp;
branches;
next	1.17;
commitid	kB7NF5kSlmUaVfjG;

1.17
date	2025.11.02.08.52.13;	author adam;	state Exp;
branches;
next	1.16;
commitid	hdaVwMAEUWR8pXgG;

1.16
date	2025.07.01.15.14.43;	author adam;	state Exp;
branches;
next	1.15;
commitid	sA2cBFYBXpUBv31G;

1.15
date	2025.05.21.15.25.49;	author adam;	state Exp;
branches;
next	1.14;
commitid	6aTN21WjRYk8TMVF;

1.14
date	2025.04.28.10.31.33;	author adam;	state Exp;
branches;
next	1.13;
commitid	Tocq615J6mYPZNSF;

1.13
date	2024.10.19.05.39.56;	author adam;	state Exp;
branches;
next	1.12;
commitid	fYRSlpIWMYluweuF;

1.12
date	2024.09.15.07.02.19;	author adam;	state Exp;
branches;
next	1.11;
commitid	x365AQIKhret4SpF;

1.11
date	2024.04.30.06.05.18;	author adam;	state Exp;
branches;
next	1.10;
commitid	id0E8i4RwCC4c88F;

1.10
date	2024.04.12.15.39.49;	author adam;	state Exp;
branches;
next	1.9;
commitid	52ilmjFHKDf0XR5F;

1.9
date	2024.01.18.18.00.14;	author adam;	state Exp;
branches;
next	1.8;
commitid	hNXpsHx3SuHqsXUE;

1.8
date	2020.05.26.09.16.40;	author nia;	state Exp;
branches;
next	1.7;
commitid	nNhsdZACz3PjmJ9C;

1.7
date	2019.09.22.09.55.07;	author joerg;	state Exp;
branches;
next	1.6;
commitid	FdPvRjF4OzwBwZDB;

1.6
date	2019.04.10.08.24.05;	author adam;	state Exp;
branches;
next	1.5;
commitid	LnliQ9ieqYkikMiB;

1.5
date	2017.08.01.22.26.22;	author joerg;	state Exp;
branches;
next	1.4;
commitid	32clTfkmVE8bPy1A;

1.4
date	2017.02.25.21.11.19;	author joerg;	state Exp;
branches;
next	1.3;
commitid	rW8QfCWrsCO1snHz;

1.3
date	2016.06.20.17.24.56;	author joerg;	state Exp;
branches;
next	1.2;
commitid	ArUvympBjfBseebz;

1.2
date	2015.01.17.12.44.49;	author adam;	state Exp;
branches;
next	1.1;
commitid	yy7e1hLrfmA2pn6y;

1.1
date	2010.02.20.03.49.44;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.02.20.03.49.44;	author joerg;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2010.03.14.17.57.26;	author joerg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2010.03.16.17.07.05;	author joerg;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2010.07.09.11.53.34;	author joerg;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2016.06.20.17.11.53;	author joerg;	state Exp;
branches;
next	1.1.1.6;
commitid	rRgm3BqbmbI8aebz;

1.1.1.6
date	2017.02.25.20.54.23;	author joerg;	state Exp;
branches;
next	1.1.1.7;
commitid	ReqPI0ibLYjdmnHz;

1.1.1.7
date	2017.08.01.22.21.11;	author joerg;	state Exp;
branches;
next	1.1.1.8;
commitid	XQwPAFJku336Ny1A;

1.1.1.8
date	2019.09.22.09.47.03;	author joerg;	state Exp;
branches;
next	1.1.1.9;
commitid	N0KxAXOYyULduZDB;

1.1.1.9
date	2019.09.22.09.51.33;	author joerg;	state Exp;
branches;
next	1.1.1.10;
commitid	5kDbfPbiV3INvZDB;

1.1.1.10
date	2024.01.18.17.37.45;	author adam;	state Exp;
branches;
next	1.1.1.11;
commitid	zDULEPUODGjTkXUE;

1.1.1.11
date	2024.04.12.15.27.44;	author adam;	state Exp;
branches;
next	1.1.1.12;
commitid	tQWTddCoxBumSR5F;

1.1.1.12
date	2024.04.30.05.50.49;	author adam;	state Exp;
branches;
next	1.1.1.13;
commitid	e4DnFoZdQV9Z688F;

1.1.1.13
date	2024.09.15.06.45.25;	author adam;	state Exp;
branches;
next	1.1.1.14;
commitid	pOuXKsbh8iPCYRpF;

1.1.1.14
date	2024.10.19.05.27.34;	author adam;	state Exp;
branches;
next	1.1.1.15;
commitid	v1iXM4j1Na52seuF;

1.1.1.15
date	2025.04.28.09.44.10;	author adam;	state Exp;
branches;
next	1.1.1.16;
commitid	1zB7ffc4d2qCJNSF;

1.1.1.16
date	2025.05.21.15.11.28;	author adam;	state Exp;
branches;
next	1.1.1.17;
commitid	Nzqt2UgtvkVXNMVF;

1.1.1.17
date	2025.07.01.14.58.53;	author adam;	state Exp;
branches;
next	1.1.1.18;
commitid	wKXYoBc9F9j8q31G;

1.1.1.18
date	2025.11.02.08.32.34;	author adam;	state Exp;
branches;
next	1.1.1.19;
commitid	8C56Xg3dc0HriXgG;

1.1.1.19
date	2025.11.20.05.51.45;	author adam;	state Exp;
branches;
next	1.1.1.20;
commitid	LC6NMc2P0QpnPfjG;

1.1.1.20
date	2025.12.23.13.41.06;	author adam;	state Exp;
branches;
next	1.1.1.21;
commitid	hhQbXTytJ7PFmxnG;

1.1.1.21
date	2026.01.06.11.43.29;	author adam;	state Exp;
branches;
next	1.1.1.22;
commitid	Q4rjOheYoLWofkpG;

1.1.1.22
date	2026.03.26.11.11.16;	author adam;	state Exp;
branches;
next	1.1.1.23;
commitid	P6u0vpfNBymXxtzG;

1.1.1.23
date	2026.04.15.08.40.11;	author adam;	state Exp;
branches;
next	;
commitid	enlkxxj5Vxhi42CG;


desc
@@


1.22
log
@libarchive: updated to 3.8.7

Libarchive 3.8.7 is a security and bugfix release.

Notable fixes:

CAB: fix NULL pointer dereference during skip
CAB: Fix Heap OOB Write in CAB LZX decoder
cpio: various fixes and improvements
contrib/untar: fix out-of-bounds read
iso9660: fix undefined behavior
iso9660: fix posibble heap buffer overflow on 32-bit systems
libarchive: fix handling of option failures
libarchive: do not continue with truncated numbers
libarchive: lzop and grzip filter support
RAR: fix LZSS window size mismatch after PPMd block
@
text
@<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Mon Apr 13 12:57:34 2026 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p><i>LIBARCHIVE</i>(3) Library Functions Manual
<i>LIBARCHIVE</i>(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:9%;">libarchive &mdash; functions for
reading and writing streaming archives</p>

<p style="margin-top: 1em"><b>OVERVIEW</b></p>

<p style="margin-left:9%;">The <b>libarchive</b> library
provides a flexible interface for reading and writing
archives in various formats such as tar and cpio.
<b>libarchive</b> also supports reading and writing archives
compressed using various compression filters such as gzip
and bzip2. The library is inherently stream-oriented;
readers serially iterate through the archive, writers
serially add things to the archive. In particular, note that
there is currently no built-in support for random access nor
for in-place modification.</p>

<p style="margin-left:9%; margin-top: 1em">When reading an
archive, the library automatically detects the format and
the compression. The library currently has read support
for:</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">old-style tar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">most variants of the POSIX
&ldquo;ustar&rdquo; format,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">the POSIX &ldquo;pax
interchange&rdquo; format,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">GNU-format tar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">most common cpio archive
formats,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">7-Zip archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">ar archives (including GNU/SysV
and BSD extensions),</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">Microsoft CAB archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">ISO9660 CD images (including
RockRidge and Joliet extensions),</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">LHA archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">mtree file tree
descriptions,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">RAR and most RAR5 archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">WARC archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">XAR archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">Zip archives.</p>

<p style="margin-left:9%;">The library automatically
detects archives compressed with <i>compress</i>(1),
<i>bzip2</i>(1), <i>grzip</i>(1), <i>gzip</i>(1),
<i>lrzip</i>(1), <i>lz4</i>(1), <i>lzip</i>(1),
<i>lzop</i>(1), <i>xz</i>(1), or <i>zstd</i>(1) and
decompresses them transparently. Decompression of some
formats requires external decompressor utilities. It can
similarly detect and decode archives processed with
<i>uuencode</i>(1) or which have an <i>rpm</i>(1)
header.</p>

<p style="margin-left:9%; margin-top: 1em">When writing an
archive, you can specify the compression to be used and the
format to use. The library can write</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX-standard
&ldquo;ustar&rdquo; archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX &ldquo;pax interchange
format&rdquo; archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">cpio archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">7-Zip archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">ar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">two different variants of shar
archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">ISO9660 CD images,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">mtree file tree
descriptions,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">XAR archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:14%;">Zip archive.</p>

<p style="margin-left:9%;">Pax interchange format is an
extension of the tar archive format that eliminates
essentially all of the limitations of historic tar formats
in a standard fashion that is supported by POSIX-compliant
<i>pax</i>(1) implementations on many systems as well as
several newer implementations of <i>tar</i>(1). Note that
the default write format will suppress the pax extended
attributes for most entries; explicitly requesting pax
format will enable those attributes for all entries.</p>

<p style="margin-left:9%; margin-top: 1em">The read and
write APIs are accessed through the
<b>archive_read_XXX</b>() functions and the
<b>archive_write_XXX</b>() functions, respectively, and
either can be used independently of the other.</p>

<p style="margin-left:9%; margin-top: 1em">The rest of this
manual page provides an overview of the library operation.
More detailed information can be found in the individual
manual pages for each API or utility function.</p>

<p style="margin-top: 1em"><b>READING AN ARCHIVE</b></p>

<p style="margin-left:9%;">See <i>archive_read</i>(3).</p>

<p style="margin-top: 1em"><b>WRITING AN ARCHIVE</b></p>

<p style="margin-left:9%;">See <i>archive_write</i>(3).</p>

<p style="margin-top: 1em"><b>WRITING ENTRIES TO
DISK</b></p>

<p style="margin-left:9%;">The <i>archive_write_disk</i>(3)
API allows you to write <i>archive_entry</i>(3) objects to
disk using the same API used by <i>archive_write</i>(3). The
<i>archive_write_disk</i>(3) API is used internally by
<b>archive_read_extract</b>(); using it directly can provide
greater control over how entries get written to disk. This
API also makes it possible to share code between
archive-to-archive copy and archive-to-disk extraction
operations.</p>

<p style="margin-top: 1em"><b>READING ENTRIES FROM
DISK</b></p>

<p style="margin-left:9%;">The <i>archive_read_disk</i>(3)
supports for populating <i>archive_entry</i>(3) objects from
information in the filesystem. This includes the information
accessible from the <i>stat</i>(2) system call as well as
ACLs, extended attributes, and other metadata. The
<i>archive_read_disk</i>(3) API also supports iterating over
directory trees, which allows directories of files to be
read using an API compatible with the <i>archive_read</i>(3)
API.</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:9%;">Detailed descriptions of each
function are provided by the corresponding manual pages.</p>

<p style="margin-left:9%; margin-top: 1em">All of the
functions utilize an opaque struct archive datatype that
provides access to the archive contents.</p>

<p style="margin-left:9%; margin-top: 1em">The struct
archive_entry structure contains a complete description of a
single archive entry. It uses an opaque interface that is
fully documented in <i>archive_entry</i>(3).</p>

<p style="margin-left:9%; margin-top: 1em">Users familiar
with historic formats should be aware that the newer
variants have eliminated most restrictions on the length of
textual fields. Clients should not assume that filenames,
link names, user names, or group names are limited in
length. In particular, pax interchange format can easily
accommodate pathnames in arbitrary character sets that
exceed <i>PATH_MAX</i>.</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:9%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, non-zero on error. The
return value indicates the general severity of the error,
ranging from <b>ARCHIVE_WARN</b>, which indicates a minor
problem that should probably be reported to the user, to
<b>ARCHIVE_FATAL</b>, which indicates a serious problem that
will prevent any further operations on this archive. On
error, the <b>archive_errno</b>() function can be used to
retrieve a numeric error code (see <i>errno</i>(2)). The
<b>archive_error_string</b>() returns a textual error
message suitable for display.</p>


<p style="margin-left:9%; margin-top: 1em"><b>archive_read_new</b>()
and <b>archive_write_new</b>() return pointers to an
allocated and initialized struct archive object.</p>


<p style="margin-left:9%; margin-top: 1em"><b>archive_read_data</b>()
and <b>archive_write_data</b>() return a count of the number
of bytes actually read or written. A value of zero indicates
the end of the data for this entry. A negative value
indicates an error, in which case the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions can be used to
obtain more information.</p>

<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>

<p style="margin-left:9%;">There are character set
conversions within the <i>archive_entry</i>(3) functions
that are impacted by the currently-selected locale.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:9%;"><i>tar</i>(1),
<i>archive_entry</i>(3), <i>archive_read</i>(3),
<i>archive_util</i>(3), <i>archive_write</i>(3),
<i>tar</i>(5)</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:9%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:9%;">The <b>libarchive</b> library
was originally written by Tim Kientzle
&lt;kientzle@@acm.org&gt;.</p>

<p style="margin-top: 1em"><b>BUGS</b></p>

<p style="margin-left:9%;">Some archive formats support
information that is not supported by struct archive_entry.
Such information cannot be fully archived or restored using
this library. This includes, for example, comments,
character sets, or the arbitrary key/value pairs that can
appear in pax interchange format archives.</p>

<p style="margin-left:9%; margin-top: 1em">Conversely, of
course, not all of the information that can be stored in an
struct archive_entry is supported by all formats. For
example, cpio formats do not support nanosecond timestamps;
old tar formats do not support large device numbers.</p>

<p style="margin-left:9%; margin-top: 1em">The ISO9660
reader cannot yet read all ISO9660 images; it should learn
how to seek.</p>

<p style="margin-left:9%; margin-top: 1em">The AR writer
requires the client program to use two passes, unlike all
other libarchive writers. Debian March 18, 2012
<i>LIBARCHIVE</i>(3)</p>
<hr>
</body>
</html>
@


1.21
log
@libarchive: updated to 3.8.6

Libarchive 3.8.6 is a security and bugfix release.

Notable fixes:

libarchive: fix incompatibility with Nettle 4.x
libarchive: fix NULL pointer dereference in archive_acl_from_text_w()
bsdunzip: fix ISO week year and Gregorian year confusion
7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
7zip: fix out-of-bounds access on ELF 64-bit header
RAR5 reader: fix infinite loop in rar5 decompression
RAR5 reader: fix potential memory leak
RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice
CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab
mtree reader: Fix file descriptor leak in mtree parser cleanup
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:29 2026 -->
@


1.20
log
@libarchive: updated to 3.8.5

3.8.5

Notable bugxies:

bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:45 2026 -->
@


1.19
log
@libarchive: updated to 3.8.4

3.8.4

Notable bugxies:

bsdtar: Fix zero-length pattern issue
lib: Fix regression introduced in libarchive 3.8.2 when walking enterable but unreadable directories
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:38 2025 -->
@


1.18
log
@libarchive: updated to 3.8.3

Libarchive 3.8.3 is a bugfix and security release.

Security fixes:

lib: Create temporary files in the target directory
lha: Fix for an out-of-bounds buffer overrun when using p[H_LEVEL_OFFSET]
7-zip: Fix a buffer overrun when reading truncated 7zip headers

Notable bugxies:

lz4 and zstd: Support both lz4 and zstd data with leading skippable frames
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:03 2025 -->
@


1.17
log
@libarchive: updated to 3.8.2

Libarchive 3.8.2 is a bugfix and security release.

Security fixes:

7zip: Fix out of boundary access
tar reader: fix checking the result of the strftime

Notable bugfixes:

bsdtar: Allow filename to have CRLF endings
lib: archive_read_data: handle sparse holes at end of file correctly
lib: improve filter process handling
lib: fix error checking in writing files
lib: handle possible errors from system calls
lib: avoid leaking file descriptors into subprocesses
lib: parse_date: handle dates in 2038 and beyond if time_t is big enough
RAR5 reader: fix multiple issues in extra field parsing function
RAR5 reader: early fail when file declares data for a dir entry
tar writer: fix replacing a regular file with a dir for ARCHIVE_EXTRACT_SAFE_WRITES
tar reader (Windows): check WCS pathname in header_gnutar before overwriting
tar reader: fix an infinite loop when parsing V headers
zip writer: fix a memory leak if write callback error early
zip writer: fix writing with ZSTD compression
zstd write filter: enable Zstandard's checksum feature
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:47 2025 -->
@


1.16
log
@libarchive: updated to 3.8.1

3.8.1

Important bugfixes

various compilation fixes
fixed undefined behavior in a function in warc reader
Windows binary uses xz 5.2.5
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:41 2025 -->
@


1.15
log
@libarchive bsdtar: updated to 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:20 2025 -->
@


1.14
log
@bsdtar libarchive: updated to 3.7.9

3.7.9

Important bugfixes:

a regression in libarchive 3.7.8 regarding GNU sparse entries was fixed


3.7.8

Security fixes:

tar reader: Handle truncation in the middle of a GNU long linkname
unzip: fix null pointer dereference
tar reader: fix unchecked return value in list_item_verbose()

Important bugfixes:

7zip reader: add SPARC
tar reader: Ignore ustar size when pax size is present
tar writer: Fix bug when -s/a/b/ used more than once with b flag
cpio: Fix a Y2038 bug on Windows
libarchive: Handle ARCHIVE_FILTER_LZOP in archive_read_append_filter
libarchive: Adding missing seeker function to archive_read_open_FILE()
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
@


1.13
log
@libarchive: updated to 3.7.7

Libarchive 3.7.7 is a bugfix and security release

Security fixes:

gzip: prevent a hang when processing a malformed gzip inside a gzip
tar: don't crash on truncated tar archives
tar: fix two leaks in tar header parsing

Important bugfixes:

7-zip: read/write symlink paths as UTF-8
cpio: exit with an error code if an entry could not be extracted
rar5: report encrypted entries
tar: fix truncation of entry pathnames in specific archives
windows: fix ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS


Libarchive 3.7.6 is a bugfix and security release.
This release fixes a tar regression introduced in libarchive 3.7.5

Important bugfixes.

tar: clean up linkpath between entries
tar: fix memory leaks when processing symlinks or parsing pax headers
iso: be more cautious about parsing ISO-9660 timestamps
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Oct 13 08:12:10 2024 -->
@


1.12
log
@libarchive: updated to 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Fri Sep 13 20:31:06 2024 -->
d23 2
a24 2
<p>LIBARCHIVE(3) BSD Library Functions Manual
LIBARCHIVE(3)</p>
d28 2
a29 2
<p style="margin-left:6%;"><b>libarchive</b> &mdash;
functions for reading and writing streaming archives</p>
d33 1
a33 1
<p style="margin-left:6%;">The <b>libarchive</b> library
d44 1
a44 1
<p style="margin-left:6%; margin-top: 1em">When reading an
d51 1
a51 1
<p style="margin-left:12%;">old-style tar archives,</p>
d55 1
a55 1
<p style="margin-left:12%;">most variants of the POSIX
d60 1
a60 1
<p style="margin-left:12%;">the POSIX &ldquo;pax
d65 1
a65 1
<p style="margin-left:12%;">GNU-format tar archives,</p>
d69 1
a69 1
<p style="margin-left:12%;">most common cpio archive
d74 1
a74 1
<p style="margin-left:12%;">7-Zip archives,</p>
d78 1
a78 1
<p style="margin-left:12%;">ar archives (including GNU/SysV
d83 1
a83 1
<p style="margin-left:12%;">Microsoft CAB archives,</p>
d87 1
a87 1
<p style="margin-left:12%;">ISO9660 CD images (including
d92 1
a92 1
<p style="margin-left:12%;">LHA archives,</p>
d96 1
a96 1
<p style="margin-left:12%;">mtree file tree
d101 1
a101 1
<p style="margin-left:12%;">RAR and most RAR5 archives,</p>
d105 1
a105 1
<p style="margin-left:12%;">WARC archives,</p>
d109 1
a109 1
<p style="margin-left:12%;">XAR archives,</p>
d113 1
a113 1
<p style="margin-left:12%;">Zip archives.</p>
d115 9
a123 7
<p style="margin-left:6%;">The library automatically
detects archives compressed with compress(1), bzip2(1),
grzip(1), gzip(1), lrzip(1), lz4(1), lzip(1), lzop(1),
xz(1), or zstd(1) and decompresses them transparently.
Decompression of some formats requires external decompressor
utilities. It can similarly detect and decode archives
processed with uuencode(1) or which have an rpm(1)
d126 1
a126 1
<p style="margin-left:6%; margin-top: 1em">When writing an
d132 1
a132 1
<p style="margin-left:12%;">POSIX-standard
d137 1
a137 1
<p style="margin-left:12%;">POSIX &ldquo;pax interchange
d142 1
a142 1
<p style="margin-left:12%;">cpio archives,</p>
d146 1
a146 1
<p style="margin-left:12%;">7-Zip archives,</p>
d150 1
a150 1
<p style="margin-left:12%;">ar archives,</p>
d154 1
a154 1
<p style="margin-left:12%;">two different variants of shar
d159 1
a159 1
<p style="margin-left:12%;">ISO9660 CD images,</p>
d163 1
a163 1
<p style="margin-left:12%;">mtree file tree
d168 1
a168 1
<p style="margin-left:12%;">XAR archives,</p>
d172 1
a172 1
<p style="margin-left:12%;">Zip archive.</p>
d174 1
a174 1
<p style="margin-left:6%;">Pax interchange format is an
d178 5
a182 5
pax(1) implementations on many systems as well as several
newer implementations of tar(1). Note that the default write
format will suppress the pax extended attributes for most
entries; explicitly requesting pax format will enable those
attributes for all entries.</p>
d184 1
a184 1
<p style="margin-left:6%; margin-top: 1em">The read and
d190 1
a190 1
<p style="margin-left:6%; margin-top: 1em">The rest of this
d197 1
a197 1
<p style="margin-left:6%;">See archive_read(3).</p>
d201 1
a201 1
<p style="margin-left:6%;">See archive_write(3).</p>
d206 4
a209 4
<p style="margin-left:6%;">The archive_write_disk(3) API
allows you to write archive_entry(3) objects to disk using
the same API used by archive_write(3). The
archive_write_disk(3) API is used internally by
d219 2
a220 2
<p style="margin-left:6%;">The archive_read_disk(3)
supports for populating archive_entry(3) objects from
d222 3
a224 3
accessible from the stat(2) system call as well as ACLs,
extended attributes, and other metadata. The
archive_read_disk(3) API also supports iterating over
d226 1
a226 1
read using an API compatible with the archive_read(3)
d231 1
a231 1
<p style="margin-left:6%;">Detailed descriptions of each
d234 1
a234 1
<p style="margin-left:6%; margin-top: 1em">All of the
d238 1
a238 1
<p style="margin-left:6%; margin-top: 1em">The struct
d241 1
a241 1
fully documented in archive_entry(3).</p>
d243 1
a243 1
<p style="margin-left:6%; margin-top: 1em">Users familiar
d254 1
a254 1
<p style="margin-left:6%;">Most functions return
d262 1
a262 1
retrieve a numeric error code (see errno(2)). The
d267 1
a267 1
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_new</b>()
d272 1
a272 1
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_data</b>()
d282 3
a284 3
<p style="margin-left:6%;">There are character set
conversions within the archive_entry(3) functions that are
impacted by the currently-selected locale.</p>
d288 4
a291 3
<p style="margin-left:6%;">tar(1), archive_entry(3),
archive_read(3), archive_util(3), archive_write(3),
tar(5)</p>
d295 1
a295 1
<p style="margin-left:6%;">The <b>libarchive</b> library
d300 1
a300 1
<p style="margin-left:6%;">The <b>libarchive</b> library
d306 1
a306 1
<p style="margin-left:6%;">Some archive formats support
d313 1
a313 1
<p style="margin-left:6%; margin-top: 1em">Conversely, of
d319 1
a319 1
<p style="margin-left:6%; margin-top: 1em">The ISO9660
d323 1
a323 1
<p style="margin-left:6%; margin-top: 1em">The AR writer
d325 2
a326 4
other libarchive writers.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
March&nbsp;18, 2012 BSD</p>
@


1.11
log
@libarchive: updated to 3.7.4

Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:47 2024 -->
@


1.10
log
@libarchive: updated to 3.7.3

Libarchive 3.7.3 is a feature, security and bugfix release.

New features:

PCRE2 support
add trailing letter b to bsdtar(1) substitute pattern
add support for long options "--group" and "--owner" to tar(1)

Security fixes:

Fix possible vulnerability in tar error reporting introduced in f27c173

Important bugfixes:

ISO9660: preserve the natural order of links
rar5: fix decoding unicode filenames on Windows
rar5: fix infinite loop if during rar5 decompression the last block produced no data
xz filter: fix incorrect eof at the end of an lzip member
zip: fix end-of-data marker processing when decompressing zip archives
multiple bsdunzip(1) fixes
filetime truncation fix on Windows
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:27 2024 -->
@


1.9
log
@libarchive: updated to 3.7.2

Libarchive 3.7.2 is a security, bugfix and feature release.

Security fixes:

Multiple vulnerabilities have been fixed in the PAX writer (1b4e0d0)
Important bugfixes:

bsdunzip(1) now correctly handles arguments following an -x after the zipfile
New features:

bsdunzip(1) now supports the "--version" flag
7-zip reader now translates Windows permissions into UNIX permissions
uudecode filter in raw mode now supports file name and file mode
zstd filter now supports the "long" write option


Libarchive 3.7.1 is a security, feature and bugfix release.

Security fixes:

SEGV and stack buffer overflow in verbose mode of cpio
Feature updates:

bsdunzip updated to match latest upstream code
Important bugfixes:

miscellaneous functional bugfixes
build fixes on multiple platforms


Libarchive 3.7.0 is a feature and bugfix release.

New features:

bsdunzip: new tool ported from FreeBSD
drop-in replacement for Info-ZIP unzip, not yet ported for Windows
7zip reader: support for Zstandard compression
7zip reader: support for ARM64 filter
zstd filter: support for multi-frame zstd archives
Other notable bugfixes and improvements:

pax: fix year 2038 problem on platforms with 64-bit time_t
Windows: Universal Windows Platform (UWP) fixes and improvements
Windows: bcrypt usage fixes and improvements
Windows: time function usage fixes and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
@


1.8
log
@libarchive: Update to 3.4.3

Libarchive 3.4.3 is a feature and bugfix release.

New features:

    support for pzstd compressed files (#1357)
    support for RHT.security.selinux tar extended attribute (#1348)

Important bugfixes:

    various zstd fixes and improvements (#1342 #1352 #1359)
    child process handling fixes (#1372)

Libarchive 3.4.2 is a feature and security release.

New features:

    support for atomic file extraction (bsdtar -x --safe-writes) (#1289)
    support for mbed TLS (PolarSSL) (#1301)

Important bugfixes:

    security fixes in RAR5 reader (#1280 #1326)
    compression buffer fix in XAR writer (#1317)
    fix uname and gname longer than 32 characters in PAX writer (#1319)
    fix segfault when archiving hard links in ISO9660 and XAR writers (#1325)
    fix support for extracting 7z archive entries with Delta filter (#987)

Libarchive 3.4.1 is a feature and security release.

New features:

    Unicode filename support for reading lha/lzh archives
    New pax write option "xattrhdr"

Important bugfixes:

    security fixes in wide string processing (#1276 #1298)
    security fixes in RAR5 reader (#1212 #1217 #1296)
    security fixes and optimizations to write filter logic (#351)
    security fix related to use of readlink(2) (1dae5a5)
    sparse file handling fixes (#1218 #1260)

Thanks to all contributors and bug reporters.
Special thanks to Christos Zoulas (@@zoulasc) from NetBSD for the atomic file extraction feature.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Wed May 20 01:10:08 2020 -->
d56 1
a56 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>
d60 2
a61 2
<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
interchange&rsquo;&rsquo; format,</p>
d74 1
a74 2
<p style="margin-left:12%;">ISO9660 CD images (including
RockRidge and Joliet extensions),</p>
d78 2
a79 1
<p style="margin-left:12%;">Zip archives,</p>
d83 1
a83 2
<p style="margin-left:12%;">ar archives (including GNU/SysV
and BSD extensions),</p>
d87 2
a88 1
<p style="margin-left:12%;">Microsoft CAB archives,</p>
d101 9
a109 1
<p style="margin-left:12%;">RAR archives,</p>
d113 1
a113 1
<p style="margin-left:12%;">XAR archives.</p>
d116 7
a122 4
detects archives compressed with gzip(1), bzip2(1), xz(1),
lzip(1), or compress(1) and decompresses them transparently.
It can similarly detect and decode archives processed with
uuencode(1) or which have an rpm(1) header.</p>
d131 6
a136 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>
d140 1
a140 2
<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
interchange format&rsquo;&rsquo; archives,</p>
d144 1
a144 2
<p style="margin-left:12%;">POSIX octet-oriented cpio
archives,</p>
d148 1
a148 1
<p style="margin-left:12%;">Zip archive,</p>
d161 2
a162 5
<p style="margin-left:12%;">7-Zip archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">ar archives,</p>
d166 1
a166 2
<p style="margin-left:12%;">mtree file tree
descriptions,</p>
d170 1
a170 1
<p style="margin-left:12%;">XAR archives.</p>
@


1.7
log
@Update for libarchive-3.4.0:
- improvements for Android APK and JAR archives
- better support for non-recursive list and extract
- tar --exclude-vcs support
- fixes for file attributes and flags handling
- zipx support
- rar 5.0 reader
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
d56 1
a56 1
&ldquo;ustar&rdquo; format,</p>
d60 2
a61 2
<p style="margin-left:12%;">the POSIX &ldquo;pax
interchange&rdquo; format,</p>
d120 1
a120 1
&ldquo;ustar&rdquo; archives,</p>
d124 2
a125 2
<p style="margin-left:12%;">POSIX &ldquo;pax interchange
format&rdquo; archives,</p>
@


1.6
log
@libarchive: updated to 3.3.3

libarchive 3.3.3:
Avoid super-linear slowdown on malformed mtree files
Many fixes for building with Visual Studio
NO_OVERWRITE doesn't change existing directory attributes
New support for Zstandard read and write filters
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:10 2018 -->
d56 1
a56 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>
d60 2
a61 2
<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
interchange&rsquo;&rsquo; format,</p>
d120 1
a120 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>
d124 2
a125 2
<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
interchange format&rsquo;&rsquo; archives,</p>
@


1.5
log
@Merge for libarchive-3.3.2.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
@


1.4
log
@Merge libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
d56 1
a56 1
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>
d60 1
a60 1
<p style="margin-left:12%;">the POSIX &lsquo;&lsquo;pax
d120 1
a120 1
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>
d124 1
a124 1
<p style="margin-left:12%;">POSIX &lsquo;&lsquo;pax
@


1.3
log
@Update for libarchive 3.2.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
d56 1
a56 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>
d60 1
a60 1
<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
d120 1
a120 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>
d124 1
a124 1
<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
@


1.2
log
@Changes 3.1.2:
This is a maintenance update to fix issues with the new RAR seeking
feature. This new release also contains fixes for build failures when
building libarchive using Visual Studio 2012 and MinGW.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.21 -->
<!-- CreationDate: Sat Feb  9 12:24:07 2013 -->
d185 1
a185 1
<p style="margin-left:6%;">See libarchive_read(3).</p>
d189 1
a189 1
<p style="margin-left:6%;">See libarchive_write(3).</p>
d288 2
a289 2
was originally written by Tim Kientzle &lang;
kientzle@@acm.org&rang; .</p>
@


1.1
log
@Initial revision
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:35 2010 -->
d11 4
a14 3
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
d23 2
a24 2
<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions
Manual LIBARCHIVE(3)</p>
d26 1
a26 1
<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
d28 1
a28 1
<p style="margin-left:8%;"><b>libarchive</b> &mdash;
d31 1
a31 1
<p style="margin-top: 1em" valign="top"><b>LIBRARY</b></p>
d33 1
a33 7
<p style="margin-left:8%;">Streaming Archive Library
(libarchive, &minus;larchive)</p>


<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
d35 8
a42 5
streaming archive files such as tar and cpio. The library is
inherently stream-oriented; readers serially iterate through
the archive, writers serially add things to the archive. In
particular, note that there is no built-in support for
random access nor for in-place modification.</p>
d44 1
a44 1
<p style="margin-left:8%; margin-top: 1em">When reading an
d49 1
a49 1
<p valign="top"><b>&bull;</b></p>
d51 1
a51 1
<p style="margin-left:14%;">old-style tar archives,</p>
d53 1
a53 1
<p valign="top"><b>&bull;</b></p>
d55 2
a56 2
<p style="margin-left:14%;">most variants of the POSIX
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>
d58 1
a58 1
<p valign="top"><b>&bull;</b></p>
d60 1
a60 1
<p style="margin-left:14%;">the POSIX &lsquo;&lsquo;pax
d63 1
a63 1
<p valign="top"><b>&bull;</b></p>
d65 1
a65 1
<p style="margin-left:14%;">GNU-format tar archives,</p>
d67 1
a67 1
<p valign="top"><b>&bull;</b></p>
d69 1
a69 1
<p style="margin-left:14%;">most common cpio archive
d72 13
a84 1
<p valign="top"><b>&bull;</b></p>
d86 1
a86 2
<p style="margin-left:14%;">ISO9660 CD images (with or
without RockRidge extensions),</p>
d88 1
a88 1
<p valign="top"><b>&bull;</b></p>
d90 1
a90 1
<p style="margin-left:14%;">Zip archives.</p>
d92 1
a92 3
<p style="margin-left:8%;">The library automatically
detects archives compressed with gzip(1), bzip2(1), or
compress(1) and decompresses them transparently.</p>
d94 20
a113 1
<p style="margin-left:8%; margin-top: 1em">When writing an
d117 1
a117 1
<p valign="top"><b>&bull;</b></p>
d119 2
a120 2
<p style="margin-left:14%;">POSIX-standard
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>
d122 1
a122 1
<p valign="top"><b>&bull;</b></p>
d124 1
a124 1
<p style="margin-left:14%;">POSIX &lsquo;&lsquo;pax
d127 1
a127 1
<p valign="top"><b>&bull;</b></p>
d129 1
a129 1
<p style="margin-left:14%;">POSIX octet-oriented cpio
d132 3
a134 1
<p valign="top"><b>&bull;</b></p>
d136 1
a136 2
<p style="margin-left:14%;">two different variants of shar
archives.</p>
d138 25
a162 1
<p style="margin-left:8%;">Pax interchange format is an
d172 1
a172 1
<p style="margin-left:8%; margin-top: 1em">The read and
d178 1
a178 1
<p style="margin-left:8%; margin-top: 1em">The rest of this
d183 1
a183 2
<p style="margin-top: 1em" valign="top"><b>READING AN
ARCHIVE</b></p>
d185 1
a185 96
<p style="margin-left:8%;">To read an archive, you must
first obtain an initialized struct archive object from
<b>archive_read_new</b>(). You can then modify this object
for the desired operations with the various
<b>archive_read_set_XXX</b>() and
<b>archive_read_support_XXX</b>() functions. In particular,
you will need to invoke appropriate
<b>archive_read_support_XXX</b>() functions to enable the
corresponding compression and format support. Note that
these latter functions perform two distinct operations: they
cause the corresponding support code to be linked into your
program, and they enable the corresponding auto-detect code.
Unless you have specific constraints, you will generally
want to invoke <b>archive_read_support_compression_all</b>()
and <b>archive_read_support_format_all</b>() to enable
auto-detect for all formats and compression types currently
supported by the library.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
prepared the struct archive object, you call
<b>archive_read_open</b>() to actually open the archive and
prepare it for reading. There are several variants of this
function; the most basic expects you to provide pointers to
several functions that can provide blocks of bytes from the
archive. There are convenience forms that allow you to
specify a filename, file descriptor, <i>FILE *</i> object,
or a block of memory from which to read the archive data.
Note that the core library makes no assumptions about the
size of the blocks read; callback functions are free to read
whatever block size is most appropriate for the medium.</p>

<p style="margin-left:8%; margin-top: 1em">Each archive
entry consists of a header followed by a certain amount of
data. You can obtain the next header with
<b>archive_read_next_header</b>(), which returns a pointer
to an struct archive_entry structure with information about
the current archive element. If the entry is a regular file,
then the header will be followed by the file data. You can
use <b>archive_read_data</b>() (which works much like the
read(2) system call) to read this data from the archive. You
may prefer to use the higher-level
<b>archive_read_data_skip</b>(), which reads and discards
the data for this entry,
<b>archive_read_data_to_buffer</b>(), which reads the data
into an in-memory buffer,
<b>archive_read_data_to_file</b>(), which copies the data to
the provided file descriptor, or
<b>archive_read_extract</b>(), which recreates the specified
entry on disk and copies data from the archive. In
particular, note that <b>archive_read_extract</b>() uses the
struct archive_entry structure that you provide it, which
may differ from the entry just read from the archive. In
particular, many applications will want to override the
pathname, file permissions, or ownership.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
finished reading data from the archive, you should call
<b>archive_read_close</b>() to close the archive, then call
<b>archive_read_finish</b>() to release all resources,
including all memory allocated by the library.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_read(3) manual page provides more detailed calling
information for this API.</p>

<p style="margin-top: 1em" valign="top"><b>WRITING AN
ARCHIVE</b></p>

<p style="margin-left:8%;">You use a similar process to
write an archive. The <b>archive_write_new</b>() function
creates an archive object useful for writing, the various
<b>archive_write_set_XXX</b>() functions are used to set
parameters for writing the archive, and
<b>archive_write_open</b>() completes the setup and opens
the archive for writing.</p>

<p style="margin-left:8%; margin-top: 1em">Individual
archive entries are written in a three-step process: You
first initialize a struct archive_entry structure with
information about the new entry. At a minimum, you should
set the pathname of the entry and provide a <i>struct
stat</i> with a valid <i>st_mode</i> field, which specifies
the type of object and <i>st_size</i> field, which specifies
the size of the data portion of the object. The
<b>archive_write_header</b>() function actually writes the
header data to the archive. You can then use
<b>archive_write_data</b>() to write the actual data.</p>

<p style="margin-left:8%; margin-top: 1em">After all
entries have been written, use the
<b>archive_write_finish</b>() function to release all
resources.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_write(3) manual page provides more detailed calling
information for this API.</p>
d187 1
d189 1
a189 1
<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
d191 29
a219 1
<p style="margin-left:8%;">Detailed descriptions of each
d222 1
a222 1
<p style="margin-left:8%; margin-top: 1em">All of the
d226 1
a226 1
<p style="margin-left:8%; margin-top: 1em">The struct
d231 1
a231 1
<p style="margin-left:8%; margin-top: 1em">Users familiar
d240 1
a240 2
<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>
d242 5
a246 5
<p style="margin-left:8%;">Most functions return zero on
success, non-zero on error. The return value indicates the
general severity of the error, ranging from
<b>ARCHIVE_WARN</b>, which indicates a minor problem that
should probably be reported to the user, to
d255 1
a255 1
<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>()
d260 1
a260 1
<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>()
d268 1
d270 1
a270 3
<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>

<p style="margin-left:8%;">There are character set
d274 1
a274 1
<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>
d276 1
a276 1
<p style="margin-left:8%;">tar(1), archive_entry(3),
d280 1
a280 1
<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>
d282 1
a282 1
<p style="margin-left:8%;">The <b>libarchive</b> library
d285 1
a285 1
<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>
d287 3
a289 3
<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@@acm.org&rang;.</p>
d291 1
a291 1
<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>
d293 1
a293 1
<p style="margin-left:8%;">Some archive formats support
d300 1
a300 1
<p style="margin-left:8%; margin-top: 1em">Conversely, of
d306 7
d314 2
a315 2
<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
August&nbsp;19, 2006 FreeBSD&nbsp;8.0</p>
@


1.1.1.1
log
@Import libarchive 2.8.0:
- Infrastructure:
  - Allow command line tools as fallback for missing compression
    libraries. If compiled without gzip for example, gunzip will
    be used automatically.
  - Improved support for a number of platforms like high-resolution
    timestamps and Extended Attributes on various Unix systems
  - New convience interface for creating archives based on disk content,
    complement of the archive_write_disk interface.
- Frontends:
  - bsdcpio ready for public consumption
  - hand-written date parser replaces the yacc code
- Filter system:
  - Simplified read filter chains
  - Option support for filters
  - LZMA, XZ, uudecode handled
- Format support:
  - Write support for mtree files based on file system or archive
    content
  - Basic read support for Joliet
  - Write support for zip files
  - Write support for shar archives, both text-only and binary-safe
@
text
@@


1.1.1.2
log
@libarchive-2.8.2:
- Fix NULL deference for short self-extracting zip archives
- Don't dereference symlinks on Linux when reading ACLs
- Better detection of SHA2 support for old OpenSSL versions
- Fix parsing of input files for bsdtar -T
- Do not leak setup_xattr into the global namespace
- Fix build when an older libarchive is already installed
- Use O_BINARY opening files in bsdtar
- Include missing archive_crc32.h
- Correctly include iconv.h required by libxml2
@
text
@d1 329
a329 801
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Sun Mar 14 02:49:17 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 58
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(August 19, 2006 LIB)74.5 48 Q(ARCHIVE 3)-.35 E(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E 2.5
(-f)0 60 S(unctions for reading and writing streaming archi)-2.5 E -.15
(ve)-.25 G(s).15 E(<h3 id="LIBRAR)36 72 Q(Y">)-.65 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(LIBRAR)36 12 Q(Y)-.65 E(</h3>)36 24 Q(<h3 id="O)
36 36 Q(VER)-.5 E(VIEW">)-.8 E -.5(OV)36 48 S(ER).5 E(VIEW)-.8 E(</h3>)
36 60 Q(The)0 72 Q 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E
(library pro)0 24 Q(vides a \215e)-.15 E(xible interf)-.15 E
(ace for reading and writing)-.1 E(streaming archi)0 36 Q .3 -.15
(ve \214)-.25 H(les such as tar and cpio.).15 E(The library is inherent\
ly stream-oriented; readers serially iterate through)0 48 Q(the archi)0
60 Q -.15(ve)-.25 G 2.5(,w).15 G
(riters serially add things to the archi)-2.5 E -.15(ve)-.25 G(.).15 E
(In particular)0 72 Q 2.5(,n)-.4 G(ote that there is no b)-2.5 E
(uilt-in support for)-.2 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(random access nor for in-place modi\214cation.)0
12 Q(<p>)36 24 Q(When reading an archi)0 36 Q -.15(ve)-.25 G 2.5(,t).15
G(he library automatically detects the)-2.5 E
(format and the compression.)0 48 Q
(The library currently has read support for:)0 60 Q(<ul>)0 72 Q 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(old-style tar archi)0 24 Q -.15(ve)
-.25 G(s,).15 E(<li>)0 36 Q(most v)0 48 Q(ariants of the POSIX)-.25 E
-.74(``)0 60 S(ustar').74 E(')-.74 E(format,)0 72 Q 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(the POSIX)0 24 Q -.74(``)0 36 S
(pax interchange').74 E(')-.74 E(format,)0 48 Q(<li>)0 60 Q
(GNU-format tar archi)0 72 Q -.15(ve)-.25 G(s,).15 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(most common cpio archi)0 24 Q .3
-.15(ve f)-.25 H(ormats,).15 E(<li>)0 36 Q
(ISO9660 CD images \(with or without RockRidge e)0 48 Q(xtensions\),)
-.15 E(<li>)0 60 Q(Zip archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q
(The library automatically detects archi)0 24 Q -.15(ve)-.25 G 2.5(sc)
.15 G(ompressed with)-2.5 E(<a href="../html1/gzip.html">gzip\(1\)</a>,)
0 36 Q(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 48 Q(or)0 60 Q
(<a href="../html1/compress.html">compress\(1\)</a>)0 72 Q 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and decompresses them transparently)0 12 Q(.)
-.65 E(<p>)36 24 Q(When writing an archi)0 36 Q -.15(ve)-.25 G 2.5(,y)
.15 G(ou can specify the compression)-2.5 E
(to be used and the format to use.)0 48 Q(The library can write)0 60 Q
(<ul>)0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(POSIX-standard)0 24 Q -.74(``)0 36 S
(ustar').74 E(')-.74 E(archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0 60 Q
(POSIX)0 72 Q 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(pax interchange format').74 E(')
-.74 E(archi)0 24 Q -.15(ve)-.25 G(s,).15 E(<li>)0 36 Q
(POSIX octet-oriented cpio archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0
60 Q(tw)0 72 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E
(ariants of shar archi)-.25 E -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q -.15(Pa)0 24 S 2.5(xi).15 G
(nterchange format is an e)-2.5 E(xtension of the tar archi)-.15 E .3
-.15(ve f)-.25 H(ormat that).15 E
(eliminates essentially all of the limitations of historic tar formats)0
36 Q(in a standard f)0 48 Q(ashion that is supported)-.1 E
(by POSIX-compliant)0 60 Q(<a href="../html1/pax.html">pax\(1\)</a>)0 72
Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(implementations on man)0 12 Q 2.5(ys)-.15 G
(ystems as well as se)-2.5 E -.15(ve)-.25 G(ral ne).15 E
(wer implementations of)-.25 E(<a href="../html1/tar)0 24 Q
(.html">tar\(1\)</a>.)-.55 E(Note that the def)0 36 Q
(ault write format will suppress the pax e)-.1 E(xtended)-.15 E(attrib)0
48 Q(utes for most entries; e)-.2 E
(xplicitly requesting pax format will)-.15 E(enable those attrib)0 60 Q
(utes for all entries.)-.2 E(<p>)36 72 Q 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(The read and write APIs are accessed through the)0 12 Q(<b>archi)0 24 Q
-.15(ve)-.25 G(_read_XXX</b>\(<code></code>\)).15 E(functions and the)0
36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_XXX</b>\(<code></code>\)).15
E(functions, respecti)0 60 Q -.15(ve)-.25 G(ly).15 E 2.5(,a)-.65 G
(nd either can be used independently)-2.5 E(of the other)0 72 Q(.)-.55 E
0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The rest of this manual page pro)0
24 Q(vides an o)-.15 E -.15(ve)-.15 G(rvie).15 E 2.5(wo)-.25 G 2.5(ft)
-2.5 G(he library)-2.5 E(operation.)0 36 Q
(More detailed information can be found in the indi)0 48 Q
(vidual manual)-.25 E(pages for each API or utility function.)0 60 Q
(<h3 id="READING AN ARCHIVE">)36 72 Q 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(READING AN ARCHIVE)36 12 Q(</h3>)36 24 Q 1.6 -.8
(To r)0 36 T(ead an archi).8 E -.15(ve)-.25 G 2.5(,y).15 G
(ou must \214rst obtain an initialized)-2.5 E(<font size="-1"></font><f\
ont size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G
(</font>).15 E(object from)0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_ne).15 E(w</b>\(<code></code>\).)-.25 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.1(Yo)0 12 S 2.5(uc)1.1 G
(an then modify this object for the desired operations with the)-2.5 E
-.25(va)0 24 S(rious).25 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_set_XXX</b>\(<code></code>\)).15 E(and)0 48 Q(<b>archi)0 60 Q
-.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\)).15 E(functions.)0
72 Q 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(In particular)0 12 Q 2.5(,y)-.4 G
(ou will need to in)-2.5 E -.2(vo)-.4 G .2 -.1(ke a).2 H(ppropriate).1 E
(<b>archi)0 24 Q -.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\))
.15 E(functions to enable the corresponding compression and format)0 36
Q(support.)0 48 Q(Note that these latter functions perform tw)0 60 Q 2.5
(od)-.1 G(istinct operations:)-2.5 E(the)0 72 Q 2.5(yc)-.15 G
(ause the corresponding support code to be link)-2.5 E(ed into your)-.1
E 0 Cg EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(program, and the)0 12 Q 2.5(ye)-.15 G
(nable the corresponding auto-detect code.)-2.5 E(Unless you ha)0 24 Q
.3 -.15(ve s)-.2 H(peci\214c constraints, you will generally w).15 E
(ant)-.1 E(to in)0 36 Q -.2(vo)-.4 G -.1(ke).2 G(<b>archi)0 48 Q -.15
(ve)-.25 G(_read_support_compression_all</b>\(<code></code>\)).15 E(and)
0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_support_format_all</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(to enable auto-detect for all formats and compression types)0 12 Q
(currently supported by the library)0 24 Q(.)-.65 E(<p>)36 36 Q
(Once you ha)0 48 Q .3 -.15(ve p)-.2 H(repared the).15 E(<font size="-1\
"></font><font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15
(ve)-.25 G(</font>).15 E(object, you call)0 72 Q 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_open</b>\(<code></code>\)).15 E(to actually open the archi)0 24 Q
.3 -.15(ve a)-.25 H(nd prepare it for reading.).15 E(There are se)0 36 Q
-.15(ve)-.25 G(ral v).15 E(ariants of this function;)-.25 E
(the most basic e)0 48 Q(xpects you to pro)-.15 E(vide pointers to se)
-.15 E -.15(ve)-.25 G(ral).15 E(functions that can pro)0 60 Q
(vide blocks of bytes from the archi)-.15 E -.15(ve)-.25 G(.).15 E
(There are con)0 72 Q -.15(ve)-.4 G(nience forms that allo).15 E 2.5(wy)
-.25 G(ou to)-2.5 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(specify a \214lename, \214le descriptor)0 12 Q
(,)-.4 E(<br><br><code></code><code>FILE *</code>)0 24 Q
(object, or a block of memory from which to read the archi)0 36 Q .3
-.15(ve d)-.25 H(ata.).15 E(Note that the core library mak)0 48 Q
(es no assumptions about the)-.1 E(size of the blocks read;)0 60 Q
(callback functions are free to read whate)0 72 Q -.15(ve)-.25 G 2.5(rb)
.15 G(lock size is)-2.5 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(most appropriate for the medium.)0 12 Q(<p>)36
24 Q(Each archi)0 36 Q .3 -.15(ve e)-.25 H
(ntry consists of a header follo).15 E(wed by a certain)-.25 E
(amount of data.)0 48 Q -1.1(Yo)0 60 S 2.5(uc)1.1 G(an obtain the ne)
-2.5 E(xt header with)-.15 E(<b>archi)0 72 Q -.15(ve)-.25 G(_read_ne).15
E(xt_header</b>\(<code></code>\),)-.15 E 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(which returns a pointer to an)0 12 Q(<font size\
="-1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q
-.15(ve)-.25 G(_entry</font>).15 E
(structure with information about the current archi)0 36 Q .3 -.15(ve e)
-.25 H(lement.).15 E(If the entry is a re)0 48 Q
(gular \214le, then the header will be follo)-.15 E(wed)-.25 E
(by the \214le data.)0 60 Q -1.1(Yo)0 72 S 2.5(uc)1.1 G(an use)-2.5 E 0
Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_data</b>\(<code></code>\)).15 E(\(which w)0 24 Q(orks much lik)
-.1 E 2.5(et)-.1 G(he)-2.5 E(<a href="../html2/read.html">read\(2\)</a>)
0 36 Q(system call\))0 48 Q(to read this data from the archi)0 60 Q -.15
(ve)-.25 G(.).15 E -1.1(Yo)0 72 S 2.5(um)1.1 G
(ay prefer to use the higher)-2.5 E(-le)-.2 E -.15(ve)-.25 G(l).15 E 0
Cg EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_data_skip</b>\(<code></code>\),).15 E
(which reads and discards the data for this entry)0 24 Q(,)-.65 E
(<b>archi)0 36 Q -.15(ve)-.25 G(_read_data_to_b).15 E(uf)-.2 E
(fer</b>\(<code></code>\),)-.25 E
(which reads the data into an in-memory b)0 48 Q(uf)-.2 E(fer)-.25 E(,)
-.4 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_data_to_\214le</b>\(<code></code>\),).15 E
(which copies the data to the pro)0 72 Q(vided \214le descriptor)-.15 E
2.5(,o)-.4 G(r)-2.5 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_e).15 E
(xtract</b>\(<code></code>\),)-.15 E
(which recreates the speci\214ed entry on disk and copies data)0 24 Q
(from the archi)0 36 Q -.15(ve)-.25 G(.).15 E(In particular)0 48 Q 2.5
(,n)-.4 G(ote that)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G(_read_e).15 E
(xtract</b>\(<code></code>\))-.15 E(uses the)0 72 Q 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E
(structure that you pro)0 24 Q(vide it, which may dif)-.15 E
(fer from the)-.25 E(entry just read from the archi)0 36 Q -.15(ve)-.25
G(.).15 E(In particular)0 48 Q 2.5(,m)-.4 G(an)-2.5 E 2.5(ya)-.15 G
(pplications will w)-2.5 E(ant to o)-.1 E -.15(ve)-.15 G(rride the).15 E
(pathname, \214le permissions, or o)0 60 Q(wnership.)-.25 E(<p>)36 72 Q
0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Once you ha)0 12 Q .3 -.15(ve \214)-.2 H
(nished reading data from the archi).15 E -.15(ve)-.25 G 2.5(,y).15 G
(ou)-2.5 E(should call)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_close</b>\(<code></code>\)).15 E(to close the archi)0 48 Q -.15
(ve)-.25 G 2.5(,t).15 G(hen call)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_\214nish</b>\(<code></code>\)).15 E(to release all resources, in\
cluding all memory allocated by the library)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The)0 24 Q(<a href="../html3/archi)0
36 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G
(_read\(3\)</a>).15 E(manual page pro)0 48 Q
(vides more detailed calling information for this API.)-.15 E
(<h3 id="WRITING AN ARCHIVE">)36 60 Q(WRITING AN ARCHIVE)36 72 Q 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q -1.1(Yo)0 24 S 2.5(uu)1.1 G
(se a similar process to write an archi)-2.5 E -.15(ve)-.25 G(.).15 E
(The)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_ne).15 E
(w</b>\(<code></code>\))-.25 E(function creates an archi)0 60 Q .3 -.15
(ve o)-.25 H(bject useful for writing,).15 E(the v)0 72 Q(arious)-.25 E
0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_write_set_XXX</b>\(<code></code>\)).15 E
(functions are used to set parameters for writing the archi)0 24 Q -.15
(ve)-.25 G 2.5(,a).15 G(nd)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_write_open</b>\(<code></code>\)).15 E
(completes the setup and opens the archi)0 48 Q .3 -.15(ve f)-.25 H
(or writing.).15 E(<p>)36 60 Q(Indi)0 72 Q(vidual archi)-.25 E .3 -.15
(ve e)-.25 H(ntries are written in a three-step).15 E 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(process:)0 12 Q -1.1(Yo)0 24 S 2.5<758c>1.1 G
(rst initialize a)-2.5 E(<font size="-1"></font><font size="-1">struct<\
/font><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(_entry</font>).15 E
(structure with information about the ne)0 48 Q 2.5(we)-.25 G(ntry)-2.5
E(.)-.65 E(At a minimum, you should set the pathname of the)0 60 Q
(entry and pro)0 72 Q(vide a)-.15 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<i></i><i>struct</i><i> stat</i>)0 12 Q
(with a v)0 24 Q(alid)-.25 E(<i></i><i>st_mode</i>)0 36 Q
(\214eld, which speci\214es the type of object and)0 48 Q
(<i></i><i>st_size</i>)0 60 Q
(\214eld, which speci\214es the size of the data portion of the object.)
0 72 Q 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_write_header</b>\(<code></code>\)).15 E
(function actually writes the header data to the archi)0 36 Q -.15(ve)
-.25 G(.).15 E -1.1(Yo)0 48 S 2.5(uc)1.1 G(an then use)-2.5 E(<b>archi)0
60 Q -.15(ve)-.25 G(_write_data</b>\(<code></code>\)).15 E
(to write the actual data.)0 72 Q 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(After all entries ha)0 24 Q .3 -.15
(ve b)-.2 H(een written, use the).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_write_\214nish</b>\(<code></code>\)).15 E
(function to release all resources.)0 48 Q(<p>)36 60 Q(The)0 72 Q 0 Cg
EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G
(_write.html">archi).15 E -.15(ve)-.25 G(_write\(3\)</a>).15 E
(manual page pro)0 24 Q
(vides more detailed calling information for this API.)-.15 E
(<h3 id="DESCRIPTION">)36 36 Q(DESCRIPTION)36 48 Q(</h3>)36 60 Q
(Detailed descriptions of each function are pro)0 72 Q(vided by the)-.15
E 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(corresponding manual pages.)0 12 Q(<p>)36 24 Q
(All of the functions utilize an opaque)0 36 Q(<font size="-1"></font><\
font size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G
(</font>).15 E(datatype that pro)0 60 Q(vides access to the archi)-.15 E
.3 -.15(ve c)-.25 H(ontents.).15 E(<p>)36 72 Q 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<font size="-1"></font><font size="-\
1">struct</font><font size="-1"> archi)0 24 Q -.15(ve)-.25 G
(_entry</font>).15 E
(structure contains a complete description of a single archi)0 36 Q -.15
(ve)-.25 G(entry)0 48 Q(.)-.65 E(It uses an opaque interf)0 60 Q
(ace that is fully documented in)-.1 E(<a href="../html3/archi)0 72 Q
-.15(ve)-.25 G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G
(_entry\(3\)</a>.).15 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Users f)0 24 Q
(amiliar with historic formats should be a)-.1 E -.1(wa)-.15 G
(re that the ne).1 E(wer)-.25 E -.25(va)0 36 S(riants ha).25 E .3 -.15
(ve e)-.2 H(liminated most restrictions on the length of te).15 E
(xtual \214elds.)-.15 E
(Clients should not assume that \214lenames, link names, user names, or)
0 48 Q(group names are limited in length.)0 60 Q(In particular)0 72 Q
2.5(,p)-.4 G(ax interchange format can easily accommodate pathnames)-2.5
E 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in arbitrary character sets that e)0 12 Q(xceed)
-.15 E(<i></i><i>P)0 24 Q -1.11(AT)-.92 G(H_MAX</i>.)1.11 E
(<h3 id="RETURN V)36 36 Q(ALUES">)-1.35 E(RETURN V)36 48 Q(ALUES)-1.35 E
(</h3>)36 60 Q(Most functions return zero on success, non-zero on error)
0 72 Q(.)-.55 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The return v)0 12 Q
(alue indicates the general se)-.25 E -.15(ve)-.25 G(rity of the error)
.15 E 2.5(,r)-.4 G(anging)-2.5 E(from)0 24 Q(<b></b><b>ARCHIVE_W)0 36 Q
(ARN</b>,)-1.2 E
(which indicates a minor problem that should probably be reported)0 48 Q
(to the user)0 60 Q 2.5(,t)-.4 G(o)-2.5 E(<b></b><b>ARCHIVE_F)0 72 Q
-1.21 -1.11(AT A)-.74 H(L</b>,)1.11 E 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(which indicates a serious problem that will pre)
0 12 Q -.15(ve)-.25 G(nt an).15 E 2.5(yf)-.15 G(urther)-2.5 E
(operations on this archi)0 24 Q -.15(ve)-.25 G(.).15 E(On error)0 36 Q
2.5(,t)-.4 G(he)-2.5 E(<b>archi)0 48 Q -.15(ve)-.25 G
(_errno</b>\(<code></code>\)).15 E(function can be used to retrie)0 60 Q
.3 -.15(ve a n)-.25 H(umeric error code \(see).15 E
(<a href="../html2/errno.html">errno\(2\)</a>\).)0 72 Q 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_error_string</b>\(<code></code>\)).15 E(returns a te)0 36 Q
(xtual error message suitable for display)-.15 E(.)-.65 E(<p>)36 48 Q
(<b>archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E(w</b>\(<code></code>\))
-.25 E(and)0 72 Q 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_write_ne).15 E
(w</b>\(<code></code>\))-.25 E
(return pointers to an allocated and initialized)0 24 Q(<font size="-1"\
></font><font size="-1">struct</font><font size="-1"> archi)0 36 Q -.15
(ve)-.25 G(</font>).15 E(object.)0 48 Q(<p>)36 60 Q(<b>archi)0 72 Q -.15
(ve)-.25 G(_read_data</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_write_data</b>\(<code></code>\)).15 E
(return a count of the number of bytes actually read or written.)0 36 Q
2.5(Av)0 48 S(alue of zero indicates the end of the data for this entry)
-2.75 E(.)-.65 E 2.5(An)0 60 S -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15
(ve v)-.25 H(alue indicates an error)-.1 E 2.5(,i)-.4 G 2.5(nw)-2.5 G
(hich case the)-2.5 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_errno</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_error_string</b>\(<code></code>\)).15 E
(functions can be used to obtain more information.)0 36 Q(<h3 id="ENVIR)
36 48 Q(ONMENT">)-.4 E(ENVIR)36 60 Q(ONMENT)-.4 E(</h3>)36 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are character set con)0 12 Q -.15(ve)-.4 G
(rsions within the).15 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G
(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>).15 E
(functions that are impacted by the currently-selected locale.)0 36 Q
(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html1/tar)0 12 Q
(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25
G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>,).15 E
(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G(_read.html">archi).15 E
-.15(ve)-.25 G(_read\(3\)</a>,).15 E(<a href="../html3/archi)0 48 Q -.15
(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>,).15 E
(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(_write.html">archi).15 E
-.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html5/tar)0 72 Q
(.html">tar\(5\)</a>)-.55 E 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="HIST)36 12 Q(OR)-.18 E(Y">)-.65 E(HIST)
36 24 Q(OR)-.18 E(Y)-.65 E(</h3>)36 36 Q(The)0 48 Q(<b>libarchi)0 60 Q
-.15(ve)-.25 G(</b>).15 E(library \214rst appeared in)0 72 Q 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(FreeBSD5.3.)0 12 Q(<h3 id="A)36 24 Q(UTHORS">)
-.55 E -.55(AU)36 36 S(THORS).55 E(</h3>)36 48 Q(<p>)36 60 Q(The)0 72 Q
0 Cg EP
%%Page: 55 55
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E
(library w)0 24 Q(as written by)-.1 E -.35(Ti)0 36 S 2.5(mK).35 G
(ientzle &lt;kientzle@@acm.or)-2.5 E(g&gt;.)-.18 E(<h3 id="B)36 48 Q
(UGS">)-.1 E -.1(BU)36 60 S(GS).1 E(</h3>)36 72 Q 0 Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Some archi)0 12 Q .3 -.15(ve f)-.25 H
(ormats support information that is not supported by).15 E(<font size="\
-1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q
-.15(ve)-.25 G(_entry</font>.).15 E
(Such information cannot be fully archi)0 36 Q -.15(ve)-.25 G 2.5(do).15
G 2.5(rr)-2.5 G(estored using this library)-2.5 E(.)-.65 E
(This includes, for e)0 48 Q(xample, comments, character sets,)-.15 E
(or the arbitrary k)0 60 Q -.15(ey)-.1 G(/v).15 E
(alue pairs that can appear in)-.25 E(pax interchange format archi)0 72
Q -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Con)0 24 Q -.15(ve)-.4 G(rsely).15 E
2.5(,o)-.65 G 2.5(fc)-2.5 G
(ourse, not all of the information that can be)-2.5 E(stored in an)0 36
Q(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \
archi)0 48 Q -.15(ve)-.25 G(_entry</font>).15 E
(is supported by all formats.)0 60 Q -.15(Fo)0 72 S 2.5(re).15 G
(xample, cpio formats do not support nanosecond timestamps;)-2.65 E 0 Cg
EP
%%Page: 58 58
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(old tar formats do not support lar)0 12 Q(ge de)
-.18 E(vice numbers.)-.25 E(</body>)0 24 Q(</html>)0 36 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.3
log
@libarchive-2.8.3: Build fix for Linux
@
text
@d1 801
a801 329
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Sun Mar 14 19:50:29 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions
Manual LIBARCHIVE(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>libarchive</b> &mdash;
functions for reading and writing streaming archives</p>

<p style="margin-top: 1em" valign="top"><b>LIBRARY</b></p>

<p style="margin-left:8%;">Streaming Archive Library
(libarchive, &minus;larchive)</p>


<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
provides a flexible interface for reading and writing
streaming archive files such as tar and cpio. The library is
inherently stream-oriented; readers serially iterate through
the archive, writers serially add things to the archive. In
particular, note that there is no built-in support for
random access nor for in-place modification.</p>

<p style="margin-left:8%; margin-top: 1em">When reading an
archive, the library automatically detects the format and
the compression. The library currently has read support
for:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">old-style tar archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">most variants of the POSIX
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">the POSIX &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; format,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">GNU-format tar archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">most common cpio archive
formats,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">ISO9660 CD images (with or
without RockRidge extensions),</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">Zip archives.</p>

<p style="margin-left:8%;">The library automatically
detects archives compressed with gzip(1), bzip2(1), or
compress(1) and decompresses them transparently.</p>

<p style="margin-left:8%; margin-top: 1em">When writing an
archive, you can specify the compression to be used and the
format to use. The library can write</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX-standard
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX &lsquo;&lsquo;pax
interchange format&rsquo;&rsquo; archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX octet-oriented cpio
archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">two different variants of shar
archives.</p>

<p style="margin-left:8%;">Pax interchange format is an
extension of the tar archive format that eliminates
essentially all of the limitations of historic tar formats
in a standard fashion that is supported by POSIX-compliant
pax(1) implementations on many systems as well as several
newer implementations of tar(1). Note that the default write
format will suppress the pax extended attributes for most
entries; explicitly requesting pax format will enable those
attributes for all entries.</p>

<p style="margin-left:8%; margin-top: 1em">The read and
write APIs are accessed through the
<b>archive_read_XXX</b>() functions and the
<b>archive_write_XXX</b>() functions, respectively, and
either can be used independently of the other.</p>

<p style="margin-left:8%; margin-top: 1em">The rest of this
manual page provides an overview of the library operation.
More detailed information can be found in the individual
manual pages for each API or utility function.</p>

<p style="margin-top: 1em" valign="top"><b>READING AN
ARCHIVE</b></p>

<p style="margin-left:8%;">To read an archive, you must
first obtain an initialized struct archive object from
<b>archive_read_new</b>(). You can then modify this object
for the desired operations with the various
<b>archive_read_set_XXX</b>() and
<b>archive_read_support_XXX</b>() functions. In particular,
you will need to invoke appropriate
<b>archive_read_support_XXX</b>() functions to enable the
corresponding compression and format support. Note that
these latter functions perform two distinct operations: they
cause the corresponding support code to be linked into your
program, and they enable the corresponding auto-detect code.
Unless you have specific constraints, you will generally
want to invoke <b>archive_read_support_compression_all</b>()
and <b>archive_read_support_format_all</b>() to enable
auto-detect for all formats and compression types currently
supported by the library.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
prepared the struct archive object, you call
<b>archive_read_open</b>() to actually open the archive and
prepare it for reading. There are several variants of this
function; the most basic expects you to provide pointers to
several functions that can provide blocks of bytes from the
archive. There are convenience forms that allow you to
specify a filename, file descriptor, <i>FILE *</i> object,
or a block of memory from which to read the archive data.
Note that the core library makes no assumptions about the
size of the blocks read; callback functions are free to read
whatever block size is most appropriate for the medium.</p>

<p style="margin-left:8%; margin-top: 1em">Each archive
entry consists of a header followed by a certain amount of
data. You can obtain the next header with
<b>archive_read_next_header</b>(), which returns a pointer
to an struct archive_entry structure with information about
the current archive element. If the entry is a regular file,
then the header will be followed by the file data. You can
use <b>archive_read_data</b>() (which works much like the
read(2) system call) to read this data from the archive. You
may prefer to use the higher-level
<b>archive_read_data_skip</b>(), which reads and discards
the data for this entry,
<b>archive_read_data_to_buffer</b>(), which reads the data
into an in-memory buffer,
<b>archive_read_data_to_file</b>(), which copies the data to
the provided file descriptor, or
<b>archive_read_extract</b>(), which recreates the specified
entry on disk and copies data from the archive. In
particular, note that <b>archive_read_extract</b>() uses the
struct archive_entry structure that you provide it, which
may differ from the entry just read from the archive. In
particular, many applications will want to override the
pathname, file permissions, or ownership.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
finished reading data from the archive, you should call
<b>archive_read_close</b>() to close the archive, then call
<b>archive_read_finish</b>() to release all resources,
including all memory allocated by the library.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_read(3) manual page provides more detailed calling
information for this API.</p>

<p style="margin-top: 1em" valign="top"><b>WRITING AN
ARCHIVE</b></p>

<p style="margin-left:8%;">You use a similar process to
write an archive. The <b>archive_write_new</b>() function
creates an archive object useful for writing, the various
<b>archive_write_set_XXX</b>() functions are used to set
parameters for writing the archive, and
<b>archive_write_open</b>() completes the setup and opens
the archive for writing.</p>

<p style="margin-left:8%; margin-top: 1em">Individual
archive entries are written in a three-step process: You
first initialize a struct archive_entry structure with
information about the new entry. At a minimum, you should
set the pathname of the entry and provide a <i>struct
stat</i> with a valid <i>st_mode</i> field, which specifies
the type of object and <i>st_size</i> field, which specifies
the size of the data portion of the object. The
<b>archive_write_header</b>() function actually writes the
header data to the archive. You can then use
<b>archive_write_data</b>() to write the actual data.</p>

<p style="margin-left:8%; margin-top: 1em">After all
entries have been written, use the
<b>archive_write_finish</b>() function to release all
resources.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_write(3) manual page provides more detailed calling
information for this API.</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">Detailed descriptions of each
function are provided by the corresponding manual pages.</p>

<p style="margin-left:8%; margin-top: 1em">All of the
functions utilize an opaque struct archive datatype that
provides access to the archive contents.</p>

<p style="margin-left:8%; margin-top: 1em">The struct
archive_entry structure contains a complete description of a
single archive entry. It uses an opaque interface that is
fully documented in archive_entry(3).</p>

<p style="margin-left:8%; margin-top: 1em">Users familiar
with historic formats should be aware that the newer
variants have eliminated most restrictions on the length of
textual fields. Clients should not assume that filenames,
link names, user names, or group names are limited in
length. In particular, pax interchange format can easily
accommodate pathnames in arbitrary character sets that
exceed <i>PATH_MAX</i>.</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return zero on
success, non-zero on error. The return value indicates the
general severity of the error, ranging from
<b>ARCHIVE_WARN</b>, which indicates a minor problem that
should probably be reported to the user, to
<b>ARCHIVE_FATAL</b>, which indicates a serious problem that
will prevent any further operations on this archive. On
error, the <b>archive_errno</b>() function can be used to
retrieve a numeric error code (see errno(2)). The
<b>archive_error_string</b>() returns a textual error
message suitable for display.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>()
and <b>archive_write_new</b>() return pointers to an
allocated and initialized struct archive object.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>()
and <b>archive_write_data</b>() return a count of the number
of bytes actually read or written. A value of zero indicates
the end of the data for this entry. A negative value
indicates an error, in which case the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions can be used to
obtain more information.</p>


<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>

<p style="margin-left:8%;">There are character set
conversions within the archive_entry(3) functions that are
impacted by the currently-selected locale.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">tar(1), archive_entry(3),
archive_read(3), archive_util(3), archive_write(3),
tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">Some archive formats support
information that is not supported by struct archive_entry.
Such information cannot be fully archived or restored using
this library. This includes, for example, comments,
character sets, or the arbitrary key/value pairs that can
appear in pax interchange format archives.</p>

<p style="margin-left:8%; margin-top: 1em">Conversely, of
course, not all of the information that can be stored in an
struct archive_entry is supported by all formats. For
example, cpio formats do not support nanosecond timestamps;
old tar formats do not support large device numbers.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;9.0
August&nbsp;19, 2006 FreeBSD&nbsp;9.0</p>
<hr>
</body>
</html>
@


1.1.1.4
log
@Import libarchive-2.8.4:
- Improved reliability of hash function detection
- Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix
@
text
@d1 329
a329 801
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Wed Jun 30 11:55:53 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 58
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(August 19, 2006 LIB)74.5 48 Q(ARCHIVE 3)-.35 E(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E 2.5
(-f)0 60 S(unctions for reading and writing streaming archi)-2.5 E -.15
(ve)-.25 G(s).15 E(<h3 id="LIBRAR)36 72 Q(Y">)-.65 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(LIBRAR)36 12 Q(Y)-.65 E(</h3>)36 24 Q(<h3 id="O)
36 36 Q(VER)-.5 E(VIEW">)-.8 E -.5(OV)36 48 S(ER).5 E(VIEW)-.8 E(</h3>)
36 60 Q(The)0 72 Q 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E
(library pro)0 24 Q(vides a \215e)-.15 E(xible interf)-.15 E
(ace for reading and writing)-.1 E(streaming archi)0 36 Q .3 -.15
(ve \214)-.25 H(les such as tar and cpio.).15 E(The library is inherent\
ly stream-oriented; readers serially iterate through)0 48 Q(the archi)0
60 Q -.15(ve)-.25 G 2.5(,w).15 G
(riters serially add things to the archi)-2.5 E -.15(ve)-.25 G(.).15 E
(In particular)0 72 Q 2.5(,n)-.4 G(ote that there is no b)-2.5 E
(uilt-in support for)-.2 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(random access nor for in-place modi\214cation.)0
12 Q(<p>)36 24 Q(When reading an archi)0 36 Q -.15(ve)-.25 G 2.5(,t).15
G(he library automatically detects the)-2.5 E
(format and the compression.)0 48 Q
(The library currently has read support for:)0 60 Q(<ul>)0 72 Q 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(old-style tar archi)0 24 Q -.15(ve)
-.25 G(s,).15 E(<li>)0 36 Q(most v)0 48 Q(ariants of the POSIX)-.25 E
-.74(``)0 60 S(ustar').74 E(')-.74 E(format,)0 72 Q 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(the POSIX)0 24 Q -.74(``)0 36 S
(pax interchange').74 E(')-.74 E(format,)0 48 Q(<li>)0 60 Q
(GNU-format tar archi)0 72 Q -.15(ve)-.25 G(s,).15 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(most common cpio archi)0 24 Q .3
-.15(ve f)-.25 H(ormats,).15 E(<li>)0 36 Q
(ISO9660 CD images \(with or without RockRidge e)0 48 Q(xtensions\),)
-.15 E(<li>)0 60 Q(Zip archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q
(The library automatically detects archi)0 24 Q -.15(ve)-.25 G 2.5(sc)
.15 G(ompressed with)-2.5 E(<a href="../html1/gzip.html">gzip\(1\)</a>,)
0 36 Q(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 48 Q(or)0 60 Q
(<a href="../html1/compress.html">compress\(1\)</a>)0 72 Q 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and decompresses them transparently)0 12 Q(.)
-.65 E(<p>)36 24 Q(When writing an archi)0 36 Q -.15(ve)-.25 G 2.5(,y)
.15 G(ou can specify the compression)-2.5 E
(to be used and the format to use.)0 48 Q(The library can write)0 60 Q
(<ul>)0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(POSIX-standard)0 24 Q -.74(``)0 36 S
(ustar').74 E(')-.74 E(archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0 60 Q
(POSIX)0 72 Q 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(pax interchange format').74 E(')
-.74 E(archi)0 24 Q -.15(ve)-.25 G(s,).15 E(<li>)0 36 Q
(POSIX octet-oriented cpio archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0
60 Q(tw)0 72 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E
(ariants of shar archi)-.25 E -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q -.15(Pa)0 24 S 2.5(xi).15 G
(nterchange format is an e)-2.5 E(xtension of the tar archi)-.15 E .3
-.15(ve f)-.25 H(ormat that).15 E
(eliminates essentially all of the limitations of historic tar formats)0
36 Q(in a standard f)0 48 Q(ashion that is supported)-.1 E
(by POSIX-compliant)0 60 Q(<a href="../html1/pax.html">pax\(1\)</a>)0 72
Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(implementations on man)0 12 Q 2.5(ys)-.15 G
(ystems as well as se)-2.5 E -.15(ve)-.25 G(ral ne).15 E
(wer implementations of)-.25 E(<a href="../html1/tar)0 24 Q
(.html">tar\(1\)</a>.)-.55 E(Note that the def)0 36 Q
(ault write format will suppress the pax e)-.1 E(xtended)-.15 E(attrib)0
48 Q(utes for most entries; e)-.2 E
(xplicitly requesting pax format will)-.15 E(enable those attrib)0 60 Q
(utes for all entries.)-.2 E(<p>)36 72 Q 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(The read and write APIs are accessed through the)0 12 Q(<b>archi)0 24 Q
-.15(ve)-.25 G(_read_XXX</b>\(<code></code>\)).15 E(functions and the)0
36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_XXX</b>\(<code></code>\)).15
E(functions, respecti)0 60 Q -.15(ve)-.25 G(ly).15 E 2.5(,a)-.65 G
(nd either can be used independently)-2.5 E(of the other)0 72 Q(.)-.55 E
0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The rest of this manual page pro)0
24 Q(vides an o)-.15 E -.15(ve)-.15 G(rvie).15 E 2.5(wo)-.25 G 2.5(ft)
-2.5 G(he library)-2.5 E(operation.)0 36 Q
(More detailed information can be found in the indi)0 48 Q
(vidual manual)-.25 E(pages for each API or utility function.)0 60 Q
(<h3 id="READING AN ARCHIVE">)36 72 Q 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(READING AN ARCHIVE)36 12 Q(</h3>)36 24 Q 1.6 -.8
(To r)0 36 T(ead an archi).8 E -.15(ve)-.25 G 2.5(,y).15 G
(ou must \214rst obtain an initialized)-2.5 E(<font size="-1"></font><f\
ont size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G
(</font>).15 E(object from)0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_ne).15 E(w</b>\(<code></code>\).)-.25 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.1(Yo)0 12 S 2.5(uc)1.1 G
(an then modify this object for the desired operations with the)-2.5 E
-.25(va)0 24 S(rious).25 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_set_XXX</b>\(<code></code>\)).15 E(and)0 48 Q(<b>archi)0 60 Q
-.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\)).15 E(functions.)0
72 Q 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(In particular)0 12 Q 2.5(,y)-.4 G
(ou will need to in)-2.5 E -.2(vo)-.4 G .2 -.1(ke a).2 H(ppropriate).1 E
(<b>archi)0 24 Q -.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\))
.15 E(functions to enable the corresponding compression and format)0 36
Q(support.)0 48 Q(Note that these latter functions perform tw)0 60 Q 2.5
(od)-.1 G(istinct operations:)-2.5 E(the)0 72 Q 2.5(yc)-.15 G
(ause the corresponding support code to be link)-2.5 E(ed into your)-.1
E 0 Cg EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(program, and the)0 12 Q 2.5(ye)-.15 G
(nable the corresponding auto-detect code.)-2.5 E(Unless you ha)0 24 Q
.3 -.15(ve s)-.2 H(peci\214c constraints, you will generally w).15 E
(ant)-.1 E(to in)0 36 Q -.2(vo)-.4 G -.1(ke).2 G(<b>archi)0 48 Q -.15
(ve)-.25 G(_read_support_compression_all</b>\(<code></code>\)).15 E(and)
0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_support_format_all</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(to enable auto-detect for all formats and compression types)0 12 Q
(currently supported by the library)0 24 Q(.)-.65 E(<p>)36 36 Q
(Once you ha)0 48 Q .3 -.15(ve p)-.2 H(repared the).15 E(<font size="-1\
"></font><font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15
(ve)-.25 G(</font>).15 E(object, you call)0 72 Q 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_open</b>\(<code></code>\)).15 E(to actually open the archi)0 24 Q
.3 -.15(ve a)-.25 H(nd prepare it for reading.).15 E(There are se)0 36 Q
-.15(ve)-.25 G(ral v).15 E(ariants of this function;)-.25 E
(the most basic e)0 48 Q(xpects you to pro)-.15 E(vide pointers to se)
-.15 E -.15(ve)-.25 G(ral).15 E(functions that can pro)0 60 Q
(vide blocks of bytes from the archi)-.15 E -.15(ve)-.25 G(.).15 E
(There are con)0 72 Q -.15(ve)-.4 G(nience forms that allo).15 E 2.5(wy)
-.25 G(ou to)-2.5 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(specify a \214lename, \214le descriptor)0 12 Q
(,)-.4 E(<br><br><code></code><code>FILE *</code>)0 24 Q
(object, or a block of memory from which to read the archi)0 36 Q .3
-.15(ve d)-.25 H(ata.).15 E(Note that the core library mak)0 48 Q
(es no assumptions about the)-.1 E(size of the blocks read;)0 60 Q
(callback functions are free to read whate)0 72 Q -.15(ve)-.25 G 2.5(rb)
.15 G(lock size is)-2.5 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(most appropriate for the medium.)0 12 Q(<p>)36
24 Q(Each archi)0 36 Q .3 -.15(ve e)-.25 H
(ntry consists of a header follo).15 E(wed by a certain)-.25 E
(amount of data.)0 48 Q -1.1(Yo)0 60 S 2.5(uc)1.1 G(an obtain the ne)
-2.5 E(xt header with)-.15 E(<b>archi)0 72 Q -.15(ve)-.25 G(_read_ne).15
E(xt_header</b>\(<code></code>\),)-.15 E 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(which returns a pointer to an)0 12 Q(<font size\
="-1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q
-.15(ve)-.25 G(_entry</font>).15 E
(structure with information about the current archi)0 36 Q .3 -.15(ve e)
-.25 H(lement.).15 E(If the entry is a re)0 48 Q
(gular \214le, then the header will be follo)-.15 E(wed)-.25 E
(by the \214le data.)0 60 Q -1.1(Yo)0 72 S 2.5(uc)1.1 G(an use)-2.5 E 0
Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_data</b>\(<code></code>\)).15 E(\(which w)0 24 Q(orks much lik)
-.1 E 2.5(et)-.1 G(he)-2.5 E(<a href="../html2/read.html">read\(2\)</a>)
0 36 Q(system call\))0 48 Q(to read this data from the archi)0 60 Q -.15
(ve)-.25 G(.).15 E -1.1(Yo)0 72 S 2.5(um)1.1 G
(ay prefer to use the higher)-2.5 E(-le)-.2 E -.15(ve)-.25 G(l).15 E 0
Cg EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_data_skip</b>\(<code></code>\),).15 E
(which reads and discards the data for this entry)0 24 Q(,)-.65 E
(<b>archi)0 36 Q -.15(ve)-.25 G(_read_data_to_b).15 E(uf)-.2 E
(fer</b>\(<code></code>\),)-.25 E
(which reads the data into an in-memory b)0 48 Q(uf)-.2 E(fer)-.25 E(,)
-.4 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_data_to_\214le</b>\(<code></code>\),).15 E
(which copies the data to the pro)0 72 Q(vided \214le descriptor)-.15 E
2.5(,o)-.4 G(r)-2.5 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_e).15 E
(xtract</b>\(<code></code>\),)-.15 E
(which recreates the speci\214ed entry on disk and copies data)0 24 Q
(from the archi)0 36 Q -.15(ve)-.25 G(.).15 E(In particular)0 48 Q 2.5
(,n)-.4 G(ote that)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G(_read_e).15 E
(xtract</b>\(<code></code>\))-.15 E(uses the)0 72 Q 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E
(structure that you pro)0 24 Q(vide it, which may dif)-.15 E
(fer from the)-.25 E(entry just read from the archi)0 36 Q -.15(ve)-.25
G(.).15 E(In particular)0 48 Q 2.5(,m)-.4 G(an)-2.5 E 2.5(ya)-.15 G
(pplications will w)-2.5 E(ant to o)-.1 E -.15(ve)-.15 G(rride the).15 E
(pathname, \214le permissions, or o)0 60 Q(wnership.)-.25 E(<p>)36 72 Q
0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Once you ha)0 12 Q .3 -.15(ve \214)-.2 H
(nished reading data from the archi).15 E -.15(ve)-.25 G 2.5(,y).15 G
(ou)-2.5 E(should call)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_close</b>\(<code></code>\)).15 E(to close the archi)0 48 Q -.15
(ve)-.25 G 2.5(,t).15 G(hen call)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_\214nish</b>\(<code></code>\)).15 E(to release all resources, in\
cluding all memory allocated by the library)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The)0 24 Q(<a href="../html3/archi)0
36 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G
(_read\(3\)</a>).15 E(manual page pro)0 48 Q
(vides more detailed calling information for this API.)-.15 E
(<h3 id="WRITING AN ARCHIVE">)36 60 Q(WRITING AN ARCHIVE)36 72 Q 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q -1.1(Yo)0 24 S 2.5(uu)1.1 G
(se a similar process to write an archi)-2.5 E -.15(ve)-.25 G(.).15 E
(The)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_ne).15 E
(w</b>\(<code></code>\))-.25 E(function creates an archi)0 60 Q .3 -.15
(ve o)-.25 H(bject useful for writing,).15 E(the v)0 72 Q(arious)-.25 E
0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_write_set_XXX</b>\(<code></code>\)).15 E
(functions are used to set parameters for writing the archi)0 24 Q -.15
(ve)-.25 G 2.5(,a).15 G(nd)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_write_open</b>\(<code></code>\)).15 E
(completes the setup and opens the archi)0 48 Q .3 -.15(ve f)-.25 H
(or writing.).15 E(<p>)36 60 Q(Indi)0 72 Q(vidual archi)-.25 E .3 -.15
(ve e)-.25 H(ntries are written in a three-step).15 E 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(process:)0 12 Q -1.1(Yo)0 24 S 2.5<758c>1.1 G
(rst initialize a)-2.5 E(<font size="-1"></font><font size="-1">struct<\
/font><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(_entry</font>).15 E
(structure with information about the ne)0 48 Q 2.5(we)-.25 G(ntry)-2.5
E(.)-.65 E(At a minimum, you should set the pathname of the)0 60 Q
(entry and pro)0 72 Q(vide a)-.15 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<i></i><i>struct</i><i> stat</i>)0 12 Q
(with a v)0 24 Q(alid)-.25 E(<i></i><i>st_mode</i>)0 36 Q
(\214eld, which speci\214es the type of object and)0 48 Q
(<i></i><i>st_size</i>)0 60 Q
(\214eld, which speci\214es the size of the data portion of the object.)
0 72 Q 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_write_header</b>\(<code></code>\)).15 E
(function actually writes the header data to the archi)0 36 Q -.15(ve)
-.25 G(.).15 E -1.1(Yo)0 48 S 2.5(uc)1.1 G(an then use)-2.5 E(<b>archi)0
60 Q -.15(ve)-.25 G(_write_data</b>\(<code></code>\)).15 E
(to write the actual data.)0 72 Q 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(After all entries ha)0 24 Q .3 -.15
(ve b)-.2 H(een written, use the).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_write_\214nish</b>\(<code></code>\)).15 E
(function to release all resources.)0 48 Q(<p>)36 60 Q(The)0 72 Q 0 Cg
EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G
(_write.html">archi).15 E -.15(ve)-.25 G(_write\(3\)</a>).15 E
(manual page pro)0 24 Q
(vides more detailed calling information for this API.)-.15 E
(<h3 id="DESCRIPTION">)36 36 Q(DESCRIPTION)36 48 Q(</h3>)36 60 Q
(Detailed descriptions of each function are pro)0 72 Q(vided by the)-.15
E 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(corresponding manual pages.)0 12 Q(<p>)36 24 Q
(All of the functions utilize an opaque)0 36 Q(<font size="-1"></font><\
font size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G
(</font>).15 E(datatype that pro)0 60 Q(vides access to the archi)-.15 E
.3 -.15(ve c)-.25 H(ontents.).15 E(<p>)36 72 Q 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<font size="-1"></font><font size="-\
1">struct</font><font size="-1"> archi)0 24 Q -.15(ve)-.25 G
(_entry</font>).15 E
(structure contains a complete description of a single archi)0 36 Q -.15
(ve)-.25 G(entry)0 48 Q(.)-.65 E(It uses an opaque interf)0 60 Q
(ace that is fully documented in)-.1 E(<a href="../html3/archi)0 72 Q
-.15(ve)-.25 G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G
(_entry\(3\)</a>.).15 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Users f)0 24 Q
(amiliar with historic formats should be a)-.1 E -.1(wa)-.15 G
(re that the ne).1 E(wer)-.25 E -.25(va)0 36 S(riants ha).25 E .3 -.15
(ve e)-.2 H(liminated most restrictions on the length of te).15 E
(xtual \214elds.)-.15 E
(Clients should not assume that \214lenames, link names, user names, or)
0 48 Q(group names are limited in length.)0 60 Q(In particular)0 72 Q
2.5(,p)-.4 G(ax interchange format can easily accommodate pathnames)-2.5
E 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in arbitrary character sets that e)0 12 Q(xceed)
-.15 E(<i></i><i>P)0 24 Q -1.11(AT)-.92 G(H_MAX</i>.)1.11 E
(<h3 id="RETURN V)36 36 Q(ALUES">)-1.35 E(RETURN V)36 48 Q(ALUES)-1.35 E
(</h3>)36 60 Q(Most functions return zero on success, non-zero on error)
0 72 Q(.)-.55 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The return v)0 12 Q
(alue indicates the general se)-.25 E -.15(ve)-.25 G(rity of the error)
.15 E 2.5(,r)-.4 G(anging)-2.5 E(from)0 24 Q(<b></b><b>ARCHIVE_W)0 36 Q
(ARN</b>,)-1.2 E
(which indicates a minor problem that should probably be reported)0 48 Q
(to the user)0 60 Q 2.5(,t)-.4 G(o)-2.5 E(<b></b><b>ARCHIVE_F)0 72 Q
-1.21 -1.11(AT A)-.74 H(L</b>,)1.11 E 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(which indicates a serious problem that will pre)
0 12 Q -.15(ve)-.25 G(nt an).15 E 2.5(yf)-.15 G(urther)-2.5 E
(operations on this archi)0 24 Q -.15(ve)-.25 G(.).15 E(On error)0 36 Q
2.5(,t)-.4 G(he)-2.5 E(<b>archi)0 48 Q -.15(ve)-.25 G
(_errno</b>\(<code></code>\)).15 E(function can be used to retrie)0 60 Q
.3 -.15(ve a n)-.25 H(umeric error code \(see).15 E
(<a href="../html2/errno.html">errno\(2\)</a>\).)0 72 Q 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_error_string</b>\(<code></code>\)).15 E(returns a te)0 36 Q
(xtual error message suitable for display)-.15 E(.)-.65 E(<p>)36 48 Q
(<b>archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E(w</b>\(<code></code>\))
-.25 E(and)0 72 Q 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_write_ne).15 E
(w</b>\(<code></code>\))-.25 E
(return pointers to an allocated and initialized)0 24 Q(<font size="-1"\
></font><font size="-1">struct</font><font size="-1"> archi)0 36 Q -.15
(ve)-.25 G(</font>).15 E(object.)0 48 Q(<p>)36 60 Q(<b>archi)0 72 Q -.15
(ve)-.25 G(_read_data</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_write_data</b>\(<code></code>\)).15 E
(return a count of the number of bytes actually read or written.)0 36 Q
2.5(Av)0 48 S(alue of zero indicates the end of the data for this entry)
-2.75 E(.)-.65 E 2.5(An)0 60 S -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15
(ve v)-.25 H(alue indicates an error)-.1 E 2.5(,i)-.4 G 2.5(nw)-2.5 G
(hich case the)-2.5 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_errno</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_error_string</b>\(<code></code>\)).15 E
(functions can be used to obtain more information.)0 36 Q(<h3 id="ENVIR)
36 48 Q(ONMENT">)-.4 E(ENVIR)36 60 Q(ONMENT)-.4 E(</h3>)36 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are character set con)0 12 Q -.15(ve)-.4 G
(rsions within the).15 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G
(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>).15 E
(functions that are impacted by the currently-selected locale.)0 36 Q
(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html1/tar)0 12 Q
(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25
G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>,).15 E
(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G(_read.html">archi).15 E
-.15(ve)-.25 G(_read\(3\)</a>,).15 E(<a href="../html3/archi)0 48 Q -.15
(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>,).15 E
(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(_write.html">archi).15 E
-.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html5/tar)0 72 Q
(.html">tar\(5\)</a>)-.55 E 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="HIST)36 12 Q(OR)-.18 E(Y">)-.65 E(HIST)
36 24 Q(OR)-.18 E(Y)-.65 E(</h3>)36 36 Q(The)0 48 Q(<b>libarchi)0 60 Q
-.15(ve)-.25 G(</b>).15 E(library \214rst appeared in)0 72 Q 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(FreeBSD5.3.)0 12 Q(<h3 id="A)36 24 Q(UTHORS">)
-.55 E -.55(AU)36 36 S(THORS).55 E(</h3>)36 48 Q(<p>)36 60 Q(The)0 72 Q
0 Cg EP
%%Page: 55 55
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E
(library w)0 24 Q(as written by)-.1 E -.35(Ti)0 36 S 2.5(mK).35 G
(ientzle &lt;kientzle@@acm.or)-2.5 E(g&gt;.)-.18 E(<h3 id="B)36 48 Q
(UGS">)-.1 E -.1(BU)36 60 S(GS).1 E(</h3>)36 72 Q 0 Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Some archi)0 12 Q .3 -.15(ve f)-.25 H
(ormats support information that is not supported by).15 E(<font size="\
-1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q
-.15(ve)-.25 G(_entry</font>.).15 E
(Such information cannot be fully archi)0 36 Q -.15(ve)-.25 G 2.5(do).15
G 2.5(rr)-2.5 G(estored using this library)-2.5 E(.)-.65 E
(This includes, for e)0 48 Q(xample, comments, character sets,)-.15 E
(or the arbitrary k)0 60 Q -.15(ey)-.1 G(/v).15 E
(alue pairs that can appear in)-.25 E(pax interchange format archi)0 72
Q -.15(ve)-.25 G(s.).15 E 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Con)0 24 Q -.15(ve)-.4 G(rsely).15 E
2.5(,o)-.65 G 2.5(fc)-2.5 G
(ourse, not all of the information that can be)-2.5 E(stored in an)0 36
Q(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \
archi)0 48 Q -.15(ve)-.25 G(_entry</font>).15 E
(is supported by all formats.)0 60 Q -.15(Fo)0 72 S 2.5(re).15 G
(xample, cpio formats do not support nanosecond timestamps;)-2.65 E 0 Cg
EP
%%Page: 58 58
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(old tar formats do not support lar)0 12 Q(ge de)
-.18 E(vice numbers.)-.25 E(</body>)0 24 Q(</html>)0 36 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.5
log
@Import libarchive-3.2.1:
- security fixes and other bugfixes
- support for multhreading in xz 5.2+
@
text
@d1 801
a801 318
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>LIBARCHIVE(3) BSD Library Functions Manual
LIBARCHIVE(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>libarchive</b> &mdash;
functions for reading and writing streaming archives</p>

<p style="margin-top: 1em"><b>OVERVIEW</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
provides a flexible interface for reading and writing
archives in various formats such as tar and cpio.
<b>libarchive</b> also supports reading and writing archives
compressed using various compression filters such as gzip
and bzip2. The library is inherently stream-oriented;
readers serially iterate through the archive, writers
serially add things to the archive. In particular, note that
there is currently no built-in support for random access nor
for in-place modification.</p>

<p style="margin-left:6%; margin-top: 1em">When reading an
archive, the library automatically detects the format and
the compression. The library currently has read support
for:</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">old-style tar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">most variants of the POSIX
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
interchange&rsquo;&rsquo; format,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">GNU-format tar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">most common cpio archive
formats,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">ISO9660 CD images (including
RockRidge and Joliet extensions),</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">Zip archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">ar archives (including GNU/SysV
and BSD extensions),</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">Microsoft CAB archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">LHA archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">mtree file tree
descriptions,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">RAR archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">XAR archives.</p>

<p style="margin-left:6%;">The library automatically
detects archives compressed with gzip(1), bzip2(1), xz(1),
lzip(1), or compress(1) and decompresses them transparently.
It can similarly detect and decode archives processed with
uuencode(1) or which have an rpm(1) header.</p>

<p style="margin-left:6%; margin-top: 1em">When writing an
archive, you can specify the compression to be used and the
format to use. The library can write</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">POSIX-standard
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
interchange format&rsquo;&rsquo; archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">POSIX octet-oriented cpio
archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">Zip archive,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">two different variants of shar
archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">ISO9660 CD images,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">7-Zip archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">ar archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">mtree file tree
descriptions,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">XAR archives.</p>

<p style="margin-left:6%;">Pax interchange format is an
extension of the tar archive format that eliminates
essentially all of the limitations of historic tar formats
in a standard fashion that is supported by POSIX-compliant
pax(1) implementations on many systems as well as several
newer implementations of tar(1). Note that the default write
format will suppress the pax extended attributes for most
entries; explicitly requesting pax format will enable those
attributes for all entries.</p>

<p style="margin-left:6%; margin-top: 1em">The read and
write APIs are accessed through the
<b>archive_read_XXX</b>() functions and the
<b>archive_write_XXX</b>() functions, respectively, and
either can be used independently of the other.</p>

<p style="margin-left:6%; margin-top: 1em">The rest of this
manual page provides an overview of the library operation.
More detailed information can be found in the individual
manual pages for each API or utility function.</p>

<p style="margin-top: 1em"><b>READING AN ARCHIVE</b></p>

<p style="margin-left:6%;">See archive_read(3).</p>

<p style="margin-top: 1em"><b>WRITING AN ARCHIVE</b></p>

<p style="margin-left:6%;">See archive_write(3).</p>

<p style="margin-top: 1em"><b>WRITING ENTRIES TO
DISK</b></p>

<p style="margin-left:6%;">The archive_write_disk(3) API
allows you to write archive_entry(3) objects to disk using
the same API used by archive_write(3). The
archive_write_disk(3) API is used internally by
<b>archive_read_extract</b>(); using it directly can provide
greater control over how entries get written to disk. This
API also makes it possible to share code between
archive-to-archive copy and archive-to-disk extraction
operations.</p>

<p style="margin-top: 1em"><b>READING ENTRIES FROM
DISK</b></p>

<p style="margin-left:6%;">The archive_read_disk(3)
supports for populating archive_entry(3) objects from
information in the filesystem. This includes the information
accessible from the stat(2) system call as well as ACLs,
extended attributes, and other metadata. The
archive_read_disk(3) API also supports iterating over
directory trees, which allows directories of files to be
read using an API compatible with the archive_read(3)
API.</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;">Detailed descriptions of each
function are provided by the corresponding manual pages.</p>

<p style="margin-left:6%; margin-top: 1em">All of the
functions utilize an opaque struct archive datatype that
provides access to the archive contents.</p>

<p style="margin-left:6%; margin-top: 1em">The struct
archive_entry structure contains a complete description of a
single archive entry. It uses an opaque interface that is
fully documented in archive_entry(3).</p>

<p style="margin-left:6%; margin-top: 1em">Users familiar
with historic formats should be aware that the newer
variants have eliminated most restrictions on the length of
textual fields. Clients should not assume that filenames,
link names, user names, or group names are limited in
length. In particular, pax interchange format can easily
accommodate pathnames in arbitrary character sets that
exceed <i>PATH_MAX</i>.</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:6%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, non-zero on error. The
return value indicates the general severity of the error,
ranging from <b>ARCHIVE_WARN</b>, which indicates a minor
problem that should probably be reported to the user, to
<b>ARCHIVE_FATAL</b>, which indicates a serious problem that
will prevent any further operations on this archive. On
error, the <b>archive_errno</b>() function can be used to
retrieve a numeric error code (see errno(2)). The
<b>archive_error_string</b>() returns a textual error
message suitable for display.</p>


<p style="margin-left:6%; margin-top: 1em"><b>archive_read_new</b>()
and <b>archive_write_new</b>() return pointers to an
allocated and initialized struct archive object.</p>


<p style="margin-left:6%; margin-top: 1em"><b>archive_read_data</b>()
and <b>archive_write_data</b>() return a count of the number
of bytes actually read or written. A value of zero indicates
the end of the data for this entry. A negative value
indicates an error, in which case the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions can be used to
obtain more information.</p>

<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>

<p style="margin-left:6%;">There are character set
conversions within the archive_entry(3) functions that are
impacted by the currently-selected locale.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">tar(1), archive_entry(3),
archive_read(3), archive_util(3), archive_write(3),
tar(5)</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
was originally written by Tim Kientzle
&lt;kientzle@@acm.org&gt;.</p>

<p style="margin-top: 1em"><b>BUGS</b></p>

<p style="margin-left:6%;">Some archive formats support
information that is not supported by struct archive_entry.
Such information cannot be fully archived or restored using
this library. This includes, for example, comments,
character sets, or the arbitrary key/value pairs that can
appear in pax interchange format archives.</p>

<p style="margin-left:6%; margin-top: 1em">Conversely, of
course, not all of the information that can be stored in an
struct archive_entry is supported by all formats. For
example, cpio formats do not support nanosecond timestamps;
old tar formats do not support large device numbers.</p>

<p style="margin-left:6%; margin-top: 1em">The ISO9660
reader cannot yet read all ISO9660 images; it should learn
how to seek.</p>

<p style="margin-left:6%; margin-top: 1em">The AR writer
requires the client program to use two passes, unlike all
other libarchive writers.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
March&nbsp;18, 2012 BSD</p>
<hr>
</body>
</html>
@


1.1.1.6
log
@Import libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
d56 1
a56 1
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>
d60 1
a60 1
<p style="margin-left:12%;">the POSIX &lsquo;&lsquo;pax
d120 1
a120 1
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>
d124 1
a124 1
<p style="margin-left:12%;">POSIX &lsquo;&lsquo;pax
@


1.1.1.7
log
@Import libarchive-3.3.2 + 9de5f3 + f9dacbf:
- Support NFS4 ACLs on Linux
- Bugfixes
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
d56 1
a56 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>
d60 1
a60 1
<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
d120 1
a120 1
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>
d124 1
a124 1
<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
@


1.1.1.8
log
@Import libarchive-3.3.3 as should have done originally.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep  3 22:55:10 2018 -->
@


1.1.1.9
log
@Import libarchive 3.4.0
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
d56 1
a56 1
&ldquo;ustar&rdquo; format,</p>
d60 2
a61 2
<p style="margin-left:12%;">the POSIX &ldquo;pax
interchange&rdquo; format,</p>
d120 1
a120 1
&ldquo;ustar&rdquo; archives,</p>
d124 2
a125 2
<p style="margin-left:12%;">POSIX &ldquo;pax interchange
format&rdquo; archives,</p>
@


1.1.1.10
log
@Import libarchive 3.7.2
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
d74 6
a79 1
<p style="margin-left:12%;">7-Zip archives,</p>
a91 5
<p style="margin-left:12%;">ISO9660 CD images (including
RockRidge and Joliet extensions),</p>

<p><b>&bull;</b></p>

d101 1
a101 9
<p style="margin-left:12%;">RAR and most RAR5 archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">WARC archives,</p>

<p><b>&bull;</b></p>

<p style="margin-left:12%;">XAR archives,</p>
d105 1
a105 1
<p style="margin-left:12%;">Zip archives.</p>
d108 4
a111 7
detects archives compressed with compress(1), bzip2(1),
grzip(1), gzip(1), lrzip(1), lz4(1), lzip(1), lzop(1),
xz(1), or zstd(1) and decompresses them transparently.
Decompression of some formats requires external decompressor
utilities. It can similarly detect and decode archives
processed with uuencode(1) or which have an rpm(1)
header.</p>
d129 2
a130 1
<p style="margin-left:12%;">cpio archives,</p>
d134 1
a134 1
<p style="margin-left:12%;">7-Zip archives,</p>
d138 2
a139 1
<p style="margin-left:12%;">ar archives,</p>
d143 1
a143 2
<p style="margin-left:12%;">two different variants of shar
archives,</p>
d147 1
a147 1
<p style="margin-left:12%;">ISO9660 CD images,</p>
d151 1
a151 2
<p style="margin-left:12%;">mtree file tree
descriptions,</p>
d155 2
a156 1
<p style="margin-left:12%;">XAR archives,</p>
d160 1
a160 1
<p style="margin-left:12%;">Zip archive.</p>
@


1.1.1.11
log
@libarchive: import version 3.7.3
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:27 2024 -->
@


1.1.1.12
log
@Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:47 2024 -->
@


1.1.1.13
log
@libarchive: imported version 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Sep 13 20:31:06 2024 -->
@


1.1.1.14
log
@libarchove: import version 3.7.7
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Sun Oct 13 08:12:10 2024 -->
d23 2
a24 2
<p><i>LIBARCHIVE</i>(3) Library Functions Manual
<i>LIBARCHIVE</i>(3)</p>
d28 2
a29 2
<p style="margin-left:9%;">libarchive &mdash; functions for
reading and writing streaming archives</p>
d33 1
a33 1
<p style="margin-left:9%;">The <b>libarchive</b> library
d44 1
a44 1
<p style="margin-left:9%; margin-top: 1em">When reading an
d51 1
a51 1
<p style="margin-left:14%;">old-style tar archives,</p>
d55 1
a55 1
<p style="margin-left:14%;">most variants of the POSIX
d60 1
a60 1
<p style="margin-left:14%;">the POSIX &ldquo;pax
d65 1
a65 1
<p style="margin-left:14%;">GNU-format tar archives,</p>
d69 1
a69 1
<p style="margin-left:14%;">most common cpio archive
d74 1
a74 1
<p style="margin-left:14%;">7-Zip archives,</p>
d78 1
a78 1
<p style="margin-left:14%;">ar archives (including GNU/SysV
d83 1
a83 1
<p style="margin-left:14%;">Microsoft CAB archives,</p>
d87 1
a87 1
<p style="margin-left:14%;">ISO9660 CD images (including
d92 1
a92 1
<p style="margin-left:14%;">LHA archives,</p>
d96 1
a96 1
<p style="margin-left:14%;">mtree file tree
d101 1
a101 1
<p style="margin-left:14%;">RAR and most RAR5 archives,</p>
d105 1
a105 1
<p style="margin-left:14%;">WARC archives,</p>
d109 1
a109 1
<p style="margin-left:14%;">XAR archives,</p>
d113 1
a113 1
<p style="margin-left:14%;">Zip archives.</p>
d115 7
a121 9
<p style="margin-left:9%;">The library automatically
detects archives compressed with <i>compress</i>(1),
<i>bzip2</i>(1), <i>grzip</i>(1), <i>gzip</i>(1),
<i>lrzip</i>(1), <i>lz4</i>(1), <i>lzip</i>(1),
<i>lzop</i>(1), <i>xz</i>(1), or <i>zstd</i>(1) and
decompresses them transparently. Decompression of some
formats requires external decompressor utilities. It can
similarly detect and decode archives processed with
<i>uuencode</i>(1) or which have an <i>rpm</i>(1)
d124 1
a124 1
<p style="margin-left:9%; margin-top: 1em">When writing an
d130 1
a130 1
<p style="margin-left:14%;">POSIX-standard
d135 1
a135 1
<p style="margin-left:14%;">POSIX &ldquo;pax interchange
d140 1
a140 1
<p style="margin-left:14%;">cpio archives,</p>
d144 1
a144 1
<p style="margin-left:14%;">7-Zip archives,</p>
d148 1
a148 1
<p style="margin-left:14%;">ar archives,</p>
d152 1
a152 1
<p style="margin-left:14%;">two different variants of shar
d157 1
a157 1
<p style="margin-left:14%;">ISO9660 CD images,</p>
d161 1
a161 1
<p style="margin-left:14%;">mtree file tree
d166 1
a166 1
<p style="margin-left:14%;">XAR archives,</p>
d170 1
a170 1
<p style="margin-left:14%;">Zip archive.</p>
d172 1
a172 1
<p style="margin-left:9%;">Pax interchange format is an
d176 5
a180 5
<i>pax</i>(1) implementations on many systems as well as
several newer implementations of <i>tar</i>(1). Note that
the default write format will suppress the pax extended
attributes for most entries; explicitly requesting pax
format will enable those attributes for all entries.</p>
d182 1
a182 1
<p style="margin-left:9%; margin-top: 1em">The read and
d188 1
a188 1
<p style="margin-left:9%; margin-top: 1em">The rest of this
d195 1
a195 1
<p style="margin-left:9%;">See <i>archive_read</i>(3).</p>
d199 1
a199 1
<p style="margin-left:9%;">See <i>archive_write</i>(3).</p>
d204 4
a207 4
<p style="margin-left:9%;">The <i>archive_write_disk</i>(3)
API allows you to write <i>archive_entry</i>(3) objects to
disk using the same API used by <i>archive_write</i>(3). The
<i>archive_write_disk</i>(3) API is used internally by
d217 2
a218 2
<p style="margin-left:9%;">The <i>archive_read_disk</i>(3)
supports for populating <i>archive_entry</i>(3) objects from
d220 3
a222 3
accessible from the <i>stat</i>(2) system call as well as
ACLs, extended attributes, and other metadata. The
<i>archive_read_disk</i>(3) API also supports iterating over
d224 1
a224 1
read using an API compatible with the <i>archive_read</i>(3)
d229 1
a229 1
<p style="margin-left:9%;">Detailed descriptions of each
d232 1
a232 1
<p style="margin-left:9%; margin-top: 1em">All of the
d236 1
a236 1
<p style="margin-left:9%; margin-top: 1em">The struct
d239 1
a239 1
fully documented in <i>archive_entry</i>(3).</p>
d241 1
a241 1
<p style="margin-left:9%; margin-top: 1em">Users familiar
d252 1
a252 1
<p style="margin-left:9%;">Most functions return
d260 1
a260 1
retrieve a numeric error code (see <i>errno</i>(2)). The
d265 1
a265 1
<p style="margin-left:9%; margin-top: 1em"><b>archive_read_new</b>()
d270 1
a270 1
<p style="margin-left:9%; margin-top: 1em"><b>archive_read_data</b>()
d280 3
a282 3
<p style="margin-left:9%;">There are character set
conversions within the <i>archive_entry</i>(3) functions
that are impacted by the currently-selected locale.</p>
d286 3
a288 4
<p style="margin-left:9%;"><i>tar</i>(1),
<i>archive_entry</i>(3), <i>archive_read</i>(3),
<i>archive_util</i>(3), <i>archive_write</i>(3),
<i>tar</i>(5)</p>
d292 1
a292 1
<p style="margin-left:9%;">The <b>libarchive</b> library
d297 1
a297 1
<p style="margin-left:9%;">The <b>libarchive</b> library
d303 1
a303 1
<p style="margin-left:9%;">Some archive formats support
d310 1
a310 1
<p style="margin-left:9%; margin-top: 1em">Conversely, of
d316 1
a316 1
<p style="margin-left:9%; margin-top: 1em">The ISO9660
d320 1
a320 1
<p style="margin-left:9%; margin-top: 1em">The AR writer
d322 4
a325 2
other libarchive writers. Debian March 18, 2012
<i>LIBARCHIVE</i>(3)</p>
@


1.1.1.15
log
@libarchive: imported version 3.7.9
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
@


1.1.1.16
log
@libarchive: import version 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:20 2025 -->
@


1.1.1.17
log
@libarchive: import version 3.8.1
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:41 2025 -->
@


1.1.1.18
log
@libarchive: imported version 3.8.2
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:47 2025 -->
@


1.1.1.19
log
@libarchive: import version 3.8.3
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:03 2025 -->
@


1.1.1.20
log
@libarchive: import 3.8.4
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:38 2025 -->
@


1.1.1.21
log
@libarchive: import version 3.8.5
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:45 2026 -->
@


1.1.1.22
log
@libarchive: imported version 3.8.6
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:29 2026 -->
@


1.1.1.23
log
@libarchive: imported version 3.8.7
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Apr 13 12:57:34 2026 -->
@


