archive formats supported by the libarchive library

Reads and writes streaming archive formats consistng of a file system objects: file, directory, or symbolic link.

This is a terse summary! See github for details.

Applications using libarchive are not necessarily able to process all formats.

Tar Formats

Reads most tar (originally Tape ARchive) archives.
Writes POSIX-standard ustar and pax
  • Device major and minor numbers are limited to 21 bits. Nodes with larger numbers will not be included
  • Path names limited to 255 bytes or even less.
  • Links are stored with the name (limited to 100 bytes) of the referenced file.
  • Extended attributes, file flags and extended security information cannot be stored.
  • entries are limited to 2GB.
pax has none of these restricions.
pax extension of ustar adds separate entry with additional attributes stored as key/value pairs.
supports most of the SCHILY keys.
Silently ignores keywords it doesn't understand.
restricted pax suppresses extended attributes
resulting in a ustar archive unless extended attributes entry is required to store a long file name, long linkname, extended ACL, file flags, or if any of the standard ustar data (user name, group name, UID, GID, etc) cannot be fully represented in the ustar header.
Result can be extracted by any program that can read POSIX-compliant pax or ustar however extended attributes are extracted as separate files in PaxHeader directories.
gnutar does not support multi-volume archives or old GNU long filename format.
Reads GNU sparse file entries, including the POSIX-based formats, but cannot write GNU sparse .

Cpio Formats

Reads many cpio variants and
Writes odc and newc .
binary reads big-endian and little-endian
odc reads and writes mtime limited to 33 bits, file sizes 8GB, other fields are limited to 18 bits.
SVR4reads, limits file size to 4GB and mtime and other fields to 32 bits.
Does not currently verify CRC. Many limitations making it unsuitable. Only the POSIX format permits files over 4GB.
Only stores numeric UID/GID values (not names), which will incorrectly transfer archives across systems with dissimilar user numbering.


shell archive script when executed on a POSIX-compliant system, will recreate a collection of file system objects.
    Writes two different formats :
  • shar Only for portably archiving small collections of plain text files.
  • shardump Attempts to preserve attributes, including owner, mode, and flags.
    Less portable than shar
ISO9660 with partial support for Rockridge extensions.
avoids security and complexity issues that come with virtual mounts and loopback devices used with CDs
zip supports entries compressed with the deflate algorithm, other compression algorithms are not supported.
arcreated by ar usually for object files, Not standardized.
Reads and writes both common variants: the GNU from SVR4, and BSD.
SEE ALSO ar(1), cpio(1), mkisofs(1), shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5), tar(5)