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