Import libarchive 2.1.9.
[dragonfly.git] / contrib / libarchive-2.1 / README
1 README for libarchive bundle.
2
3 This distribution bundle includes the following components:
4
5    * libarchive: a library for reading and writing streaming archives
6    * tar: the 'bsdtar' program is a full-featured 'tar'
7           replacement built on libarchive
8    * minitar: a compact sample demonstrating use of libarchive
9
10 The top-level directory contains the following information files:
11    * NEWS - highlights of recent changes
12    * COPYING - what you can do with this
13    * INSTALL - installation instructions
14    * README - this file
15    * configure - configuration script, see INSTALL for details.
16
17 The following files in the top-level directory are used by the
18 'configure' script:
19
20    * Makefile.am, aclocal.m4, configure.ac
21        - used to build this distribution, only needed by maintainers
22    * Makefile.in, config.h.in
23         - templates used by configure script
24    * config.aux/* - auxiliary scripts used by build system
25
26 Guide to Documentation installed by this system:
27  * bsdtar.1 explains the use of the bsdtar program
28  * libarchive.3 gives an overview of the library as a whole
29  * archive_read.3, archive_write.3, and archive_write_disk.3 provide
30    detailed calling sequences for the read and write APIs
31  * archive_entry.3 details the "struct archive_entry" utility class
32  * libarchive-formats.5 documents the file formats supported by the library
33  * tar.5 provides some detailed information about a variety of different
34    "tar" formats.
35
36 You should also read the copious comments in "archive.h" and the source
37 code for the sample "bsdtar" program for more details.  Please let me know
38 about any errors or omissions you find.
39
40 Currently, the library automatically detects and reads the following:
41   * gzip compression
42   * bzip2 compression
43   * compress/LZW compression
44   * GNU tar format (including GNU long filenames, long link names, and
45     sparse files)
46   * Solaris 9 extended tar format (including ACLs)
47   * Old V7 tar archives
48   * POSIX ustar
49   * POSIX pax interchange format
50   * POSIX octet-oriented cpio
51   * SVR4 ASCII cpio
52   * Binary cpio (big-endian or little-endian)
53   * ISO9660 CD-ROM images (with optional Rockridge extensions)
54   * ZIP archives (with uncompressed or "deflate" compressed entries)
55   * GNU and BSD 'ar' archives
56
57 The library can write:
58   * gzip compression
59   * bzip2 compression
60   * POSIX ustar
61   * POSIX pax interchange format
62   * "restricted" pax format, which will create ustar archives except for
63     entries that require pax extensions (for long filenames, ACLs, etc).
64   * POSIX octet-oriented cpio
65   * shar archives
66   * GNU and BSD 'ar' archives
67
68 Notes about the library architecture:
69
70  * This is a heavily stream-oriented system.  There is no direct
71    support for in-place modification or random access and no intention
72    of ever adding such support.  Adding such support would require
73    sacrificing a lot of other features, so don't bother asking.
74
75  * The library is designed to be extended with new compression and
76    archive formats.  The only requirement is that the format be
77    readable or writable as a stream and that each archive entry be
78    independent.
79
80  * On read, compression and format are always detected automatically.
81
82  * I've attempted to minimize static link pollution.  If you don't
83    explicitly invoke a particular feature (such as support for a
84    particular compression or format), it won't get pulled in.
85    In particular, if you don't explicitly enable a particular
86    compression or decompression support, you won't need to link
87    against the corresponding compression or decompression libraries.
88    This also reduces the size of statically-linked binaries in
89    environments where that matters.
90
91  * On read, the library accepts whatever blocks you hand it.
92    Your read callback is free to pass the library a byte at a time
93    or mmap the entire archive and give it to the library at once.
94    On write, the library always produces correctly-blocked
95    output.
96
97  * The object-style approach allows you to have multiple archive streams
98    open at once.  bsdtar uses this in its "@archive" extension.
99
100  * The archive itself is read/written using callback functions.
101    You can read an archive directly from an in-memory buffer or
102    write it to a socket, if you wish.  There are some utility
103    functions to provide easy-to-use "open file," etc, capabilities.
104
105  * The read/write APIs are designed to allow individual entries
106    to be read or written to any data source:  You can create
107    a block of data in memory and add it to a tar archive without
108    first writing a temporary file.  You can also read an entry from
109    an archive and write the data directly to a socket.  If you want
110    to read/write entries to disk, there are convenience functions to
111    make this especially easy.
112
113  * Note: "pax interchange format" is really an extended tar format,
114    despite what the name says.