diff options
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/libarchive-formats.5')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/libarchive-formats.5 | 108 |
1 files changed, 89 insertions, 19 deletions
diff --git a/Utilities/cmlibarchive/libarchive/libarchive-formats.5 b/Utilities/cmlibarchive/libarchive/libarchive-formats.5 index d223bf8..4a709b3 100644 --- a/Utilities/cmlibarchive/libarchive/libarchive-formats.5 +++ b/Utilities/cmlibarchive/libarchive/libarchive-formats.5 @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/lib/libarchive/libarchive-formats.5 201077 2009-12-28 01:50:23Z kientzle $ +.\" $FreeBSD$ .\" -.Dd December 27, 2009 +.Dd March 18, 2012 .Dt LIBARCHIVE-FORMATS 5 .Os .Sh NAME @@ -51,11 +51,11 @@ functions to enable all supported formats. The .Xr libarchive 3 library can read most tar archives. -However, it only writes POSIX-standard +It can write POSIX-standard .Dq ustar and .Dq pax interchange -formats. +formats and a subset of the legacy GNU tar format. .Pp All tar formats store each entry in one or more 512-byte records. The first record is used for file metadata, including filename, @@ -70,13 +70,18 @@ subsequent entries. .It Cm gnutar The .Xr libarchive 3 -library can read GNU-format tar archives. +library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including modern long filename and linkname support, as well as atime and ctime data. The libarchive library does not support multi-volume archives, nor the old GNU long filename format. It can read GNU sparse file entries, including the new POSIX-based -formats, but cannot write GNU sparse file entries. +formats. +.Pp +The +.Xr libarchive 3 +library can write GNU tar format, including long filename +and linkname support, as well as atime and ctime data. .It Cm pax The .Xr libarchive 3 @@ -98,6 +103,14 @@ archiver and a few LIBARCHIVE keys. The libarchive library can read most of the SCHILY keys and most of the GNU keys introduced by GNU tar. It silently ignores any keywords that it does not understand. +.Pp +The pax interchange format converts filenames to Unicode +and stores them using the UTF-8 encoding. +Prior to libarchive 3.0, libarchive erroneously assumed +that the system wide-character routines natively supported +Unicode. +This caused it to mis-handle non-ASCII filenames on systems +that did not satisfy this assumption. .It Cm restricted pax The libarchive library can also write pax archives in which it attempts to suppress the extended attributes entry whenever @@ -135,6 +148,8 @@ security information cannot be stored. Archive entries are limited to 8 gigabytes in size. .El Note that the pax interchange format has none of these restrictions. +The ustar format is old and widely supported. +It is recommended when compatibility is the primary concern. .El .Pp The libarchive library also reads a variety of commonly-used extensions to @@ -268,19 +283,68 @@ If both extensions are present, the Joliet extensions will be used and the Rockridge extensions will be ignored. In particular, this can create problems with hardlinks and symlinks, which are supported by Rockridge but not by Joliet. +.Pp +Libarchive reads ISO9660 images using a streaming strategy. +This allows it to read compressed images directly +(decompressing on the fly) and allows it to read images +directly from network sockets, pipes, and other non-seekable +data sources. +This strategy works well for optimized ISO9660 images created +by many popular programs. +Such programs collect all directory information at the beginning +of the ISO9660 image so it can be read from a physical disk +with a minimum of seeking. +However, not all ISO9660 images can be read in this fashion. +.Pp +Libarchive can also write ISO9660 images. +Such images are fully optimized with the directory information +preceding all file data. +This is done by storing all file data to a temporary file +while collecting directory information in memory. +When the image is finished, libarchive writes out the +directory structure followed by the file data. +The location used for the temporary file can be changed +by the usual environment variables. .Ss Zip format Libarchive can read and write zip format archives that have uncompressed entries and entries compressed with the .Dq deflate algorithm. -Older zip compression algorithms are not supported. -It can extract jar archives, archives that use Zip64 extensions and many +Other zip compression algorithms are not supported. +It can extract jar archives, archives that use Zip64 extensions and self-extracting zip archives. -Libarchive reads Zip archives as they are being streamed, -which allows it to read archives of arbitrary size. -It currently does not use the central directory; this -limits libarchive's ability to support some self-extracting -archives and ones that have been modified in certain ways. +Libarchive can use either of two different strategies for +reading Zip archives: +a streaming strategy which is fast and can handle extremely +large archives, and a seeking strategy which can correctly +process self-extracting Zip archives and archives with +deleted members or other in-place modifications. +.Pp +The streaming reader processes Zip archives as they are read. +It can read archives of arbitrary size from tape or +network sockets, and can decode Zip archives that have +been separately compressed or encoded. +However, self-extracting Zip archives and archives with +certain types of modifications cannot be correctly +handled. +Such archives require that the reader first process the +Central Directory, which is ordinarily located +at the end of a Zip archive and is thus inaccessible +to the streaming reader. +If the program using libarchive has enabled seek support, then +libarchive will use this to processes the central directory first. +.Pp +In particular, the seeking reader must be used to +correctly handle self-extracting archives. +Such archives consist of a program followed by a regular +Zip archive. +The streaming reader cannot parse the initial program +portion, but the seeking reader starts by reading the +Central Directory from the end of the archive. +Similarly, Zip archives that have been modified in-place +can have deleted entries or other garbage data that +can only be accurately detected by first reading the +Central Directory. .Ss Archive (library) file format The Unix archive format (commonly created by the .Xr ar 1 @@ -315,7 +379,7 @@ of a file hierarchy in which each line specifies the name of a file and provides specific metadata about that file. Libarchive can read all of the keywords supported by both the NetBSD and FreeBSD versions of -.Xr mtree 1 , +.Xr mtree 8 , although many of the keywords cannot currently be stored in an .Tn archive_entry object. @@ -342,12 +406,18 @@ using libarchive. If it cannot locate and open the file on disk, libarchive will return an error for any attempt to read the entry body. +.Ss LHA +XXX Information about libarchive's LHA support XXX +.Ss CAB +XXX Information about libarchive's CAB support XXX +.Ss XAR +XXX Information about libarchive's XAR support XXX .Ss RAR -libarchive has limited support to read files in RAR format. Currently, -libarchive can read single RAR files in RARv3 format which have been either -created uncompressed, or compressed using any of the compression methods -supported by the RARv3 format. libarchive can also extract RAR files which have -been created as self-extracting RAR files. +Libarchive has limited support for reading RAR format archives. +Currently, libarchive can read RARv3 format archives +which have been either created uncompressed, or compressed using +any of the compression methods supported by the RARv3 format. +Libarchive can also read self-extracting RAR archives. .Sh SEE ALSO .Xr ar 1 , .Xr cpio 1 , |