1 README for libarchive bundle.
3 This distribution bundle includes the following components:
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
10 The top-level directory contains the following information files:
11 * AUTHORS - who wrote all of this
12 * COPYING - what you can do with this
13 * ChangeLog - highlights of recent changes
14 * INSTALL - installation instructions
16 * configure - configuration script, see INSTALL for details.
18 The following files in the top-level directory are used by the
21 * Makefile.am, aclocal.m4, configure.ac
22 - used to build this distribution, only needed by maintainers
23 * Makefile.in, config.h.in
24 - templates used by configure script
25 * config.aux/* - auxiliary scripts used by build system
27 Guide to Documentation installed by this system:
28 * bsdtar.1 explains the use of the bsdtar program
29 * libarchive.3 gives an overview of the library as a whole
30 * archive_read.3 and archive_write.3 provide detailed calling
31 sequences for the read and write APIs
32 * archive_entry.3 details the "struct archive_entry" utility class
33 * libarchive-formats.5 documents the file formats supported by the library
34 * tar.5 provides some detailed information about a variety of different
37 You should also read the copious comments in "archive.h" and the source
38 code for the sample "bsdtar" program for more details. Please let me know
39 about any errors or omissions you find.
41 Currently, the library automatically detects and reads the following:
44 * compress/LZW compression
45 * GNU tar format (including GNU long filenames, long link names, and
47 * Solaris 9 extended tar format (including ACLs)
50 * POSIX pax interchange format
51 * POSIX octet-oriented cpio
53 * Binary cpio (big-endian or little-endian)
54 * ISO9660 CD-ROM images (with optional Rockridge extensions)
55 * ZIP archives (with uncompressed or "deflate" compressed entries)
56 * Experimental support for Unix 4th Edition "tp" archives
58 The library can write:
62 * POSIX pax interchange format
63 * "restricted" pax format, which will create ustar archives except for
64 entries that require pax extensions (for long filenames, ACLs, etc).
65 * POSIX octet-oriented cpio
68 Notes about the library architecture:
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.
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
80 * On read, compression and format are always detected automatically.
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.
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
97 * The object-style approach allows you to have multiple archive streams
98 open at once. bsdtar uses this in its "@archive" extension.
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.
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.
113 * Note: "pax interchange format" is really an extended tar format,
114 despite what the name says.