1 README for libarchive bundle.
4 * http://libarchive.googlecode.com/ is the home for ongoing
5 libarchive development, including issue tracker, additional
6 documentation, and links to the libarchive mailing lists.
8 This distribution bundle includes the following components:
10 * libarchive: a library for reading and writing streaming archives
11 * tar: the 'bsdtar' program is a full-featured 'tar'
12 replacement built on libarchive
13 * cpio: the 'bsdcpio' program is a different interface to
14 essentially the same functionality
15 * examples: Some small example programs that you may find useful.
16 * examples/minitar: a compact sample demonstrating use of libarchive.
17 I use this for testing link pollution; it should produce a very
18 small executable file on most systems.
19 * contrib: Various items sent to me by third parties;
20 please contact the authors with any questions.
22 The top-level directory contains the following information files:
23 * NEWS - highlights of recent changes
24 * COPYING - what you can do with this
25 * INSTALL - installation instructions
27 * configure - configuration script, see INSTALL for details.
28 * CMakeLists.txt - input for "cmake" build tool, see INSTALL
30 The following files in the top-level directory are used by the
33 * Makefile.am, aclocal.m4, configure.ac
34 - used to build this distribution, only needed by maintainers
35 * Makefile.in, config.h.in
36 - templates used by configure script
38 Guide to Documentation installed by this system:
39 * bsdtar.1 explains the use of the bsdtar program
40 * bsdcpio.1 explains the use of the bsdcpio program
41 * libarchive.3 gives an overview of the library as a whole
42 * archive_read.3, archive_write.3, and archive_write_disk.3 provide
43 detailed calling sequences for the read and write APIs
44 * archive_entry.3 details the "struct archive_entry" utility class
45 * archive_internals.3 provides some insight into libarchive's
46 internal structure and operation.
47 * libarchive-formats.5 documents the file formats supported by the library
48 * cpio.5, mtree.5, and tar.5 provide detailed information about a
49 variety of different archive formats, including hard-to-find details
50 about modern cpio and tar variants.
52 You should also read the copious comments in "archive.h" and the source
53 code for the sample "bsdtar" program for more details. Please let me know
54 about any errors or omissions you find.
56 Currently, the library automatically detects and reads the following:
59 * compress/LZW compression
60 * lzma and xz compression
61 * GNU tar format (including GNU long filenames, long link names, and
63 * Solaris 9 extended tar format (including ACLs)
66 * POSIX pax interchange format
67 * POSIX octet-oriented cpio
69 * Binary cpio (big-endian or little-endian)
70 * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
71 * ZIP archives (with uncompressed or "deflate" compressed entries)
72 * GNU and BSD 'ar' archives
75 The library can write:
78 * compress/LZW compression
79 * lzma and xz compression
81 * POSIX pax interchange format
82 * "restricted" pax format, which will create ustar archives except for
83 entries that require pax extensions (for long filenames, ACLs, etc).
84 * POSIX octet-oriented cpio
87 * GNU and BSD 'ar' archives
90 Notes about the library architecture:
92 * This is a heavily stream-oriented system. There is no direct
93 support for in-place modification or random access and no intention
94 of ever adding such support. Adding such support would require
95 sacrificing a lot of other features, so don't bother asking.
97 * The library is designed to be extended with new compression and
98 archive formats. The only requirement is that the format be
99 readable or writable as a stream and that each archive entry be
102 * On read, compression and format are always detected automatically.
104 * I've attempted to minimize static link pollution. If you don't
105 explicitly invoke a particular feature (such as support for a
106 particular compression or format), it won't get pulled in.
107 In particular, if you don't explicitly enable a particular
108 compression or decompression support, you won't need to link
109 against the corresponding compression or decompression libraries.
110 This also reduces the size of statically-linked binaries in
111 environments where that matters.
113 * On read, the library accepts whatever blocks you hand it.
114 Your read callback is free to pass the library a byte at a time
115 or mmap the entire archive and give it to the library at once.
116 On write, the library always produces correctly-blocked output.
118 * The object-style approach allows you to have multiple archive streams
119 open at once. bsdtar uses this in its "@archive" extension.
121 * The archive itself is read/written using callback functions.
122 You can read an archive directly from an in-memory buffer or
123 write it to a socket, if you wish. There are some utility
124 functions to provide easy-to-use "open file," etc, capabilities.
126 * The read/write APIs are designed to allow individual entries
127 to be read or written to any data source: You can create
128 a block of data in memory and add it to a tar archive without
129 first writing a temporary file. You can also read an entry from
130 an archive and write the data directly to a socket. If you want
131 to read/write entries to disk, there are convenience functions to
132 make this especially easy.
134 * Note: "pax interchange format" is really an extended tar format,
135 despite what the name says.