README 5.9 KB

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