]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - lib/libarchive/README
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / lib / libarchive / README
1 $FreeBSD$
2
3 libarchive: a library for reading and writing streaming archives
4
5 This is all under a BSD license.  Use, enjoy, but don't blame me if it breaks!
6
7 Documentation:
8  * libarchive.3 gives an overview of the library as a whole
9  * archive_read.3, archive_write.3, and archive_write_disk.3 provide
10    detailed calling sequences for the read and write APIs
11  * archive_entry.3 details the "struct archive_entry" utility class
12  * libarchive-formats.5 documents the file formats supported by the library
13  * tar.5 provides some detailed information about a variety of different
14    "tar" formats.
15
16 You should also read the copious comments in "archive.h" and the source
17 code for the sample "bsdtar" and "minitar" programs for more details.
18 Please let me know about any errors or omissions you find.
19
20 Currently, the library automatically detects and reads the following:
21   * gzip compression
22   * bzip2 compression
23   * compress/LZW compression
24   * lzma and xz compression
25   * GNU tar format (including GNU long filenames, long link names, and
26     sparse files)
27   * Solaris 9 extended tar format (including ACLs)
28   * Old V7 tar archives
29   * POSIX ustar
30   * POSIX pax interchange format
31   * POSIX octet-oriented cpio
32   * SVR4 ASCII cpio
33   * Binary cpio (big-endian or little-endian)
34   * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
35   * ZIP archives (with uncompressed or "deflate" compressed entries)
36   * GNU and BSD 'ar' archives
37   * 'mtree' format
38
39 The library can write:
40   * gzip compression
41   * bzip2 compression
42   * compress/LZW compression
43   * lzma and xz compression
44   * POSIX ustar
45   * POSIX pax interchange format
46   * "restricted" pax format, which will create ustar archives except for
47     entries that require pax extensions (for long filenames, ACLs, etc).
48   * POSIX octet-oriented cpio
49   * SVR4 "newc" cpio
50   * shar archives
51   * ZIP archives (with uncompressed or "deflate" compressed entries)
52   * GNU and BSD 'ar' archives
53   * 'mtree' format
54
55 Notes:
56  * This is a heavily stream-oriented system.  There is no direct
57    support for in-place modification or random access and no intention
58    of ever adding such support.  Adding such support would require
59    sacrificing a lot of other features, so don't bother asking.
60
61  * The library is designed to be extended with new compression and
62    archive formats.  The only requirement is that the format be
63    readable or writable as a stream and that each archive entry be
64    independent.
65
66  * On read, compression and format are always detected automatically.
67
68  * I've attempted to minimize static link pollution.  If you don't
69    explicitly invoke a particular feature (such as support for a
70    particular compression or format), it won't get pulled in.
71    In particular, if you don't explicitly enable a particular
72    compression or decompression support, you won't need to link
73    against the corresponding compression or decompression libraries.
74    This also reduces the size of statically-linked binaries in
75    environments where that matters.
76
77  * On read, the library accepts whatever blocks you hand it.
78    Your read callback is free to pass the library a byte at a time
79    or mmap the entire archive and give it to the library at once.
80    On write, the library always produces correctly-blocked
81    output.
82
83  * The object-style approach allows you to have multiple archive streams
84    open at once.  bsdtar uses this in its "@archive" extension.
85
86  * The archive itself is read/written using callback functions.
87    You can read an archive directly from an in-memory buffer or
88    write it to a socket, if you wish.  There are some utility
89    functions to provide easy-to-use "open file," etc, capabilities.
90
91  * The read/write APIs are designed to allow individual entries
92    to be read or written to any data source:  You can create
93    a block of data in memory and add it to a tar archive without
94    first writing a temporary file.  You can also read an entry from
95    an archive and write the data directly to a socket.  If you want
96    to read/write entries to disk, the archive_write_disk interface
97    treats a directory as if it were an archive so you can copy
98    from archive->disk using the same code you use for archive->archive
99    transfers.
100
101  * Note: "pax interchange format" is really an extended tar format,
102    despite what the name says.