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