Xar (archiver)
   HOME

TheInfoList



OR:

XAR (short for ''eXtensible ARchive format'') is an
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
file archiver In computing, a file archiver is utility software that combines computer file, files into a single archive file or in less common cases, multiple files. A minimally designed archiver might concatenate the content of files along with file file n ...
and the default
file format A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
of
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
’s ''archiver'' app. It was created within the
OpenDarwin Darwin is the core Unix-like operating system of macOS, iOS, watchOS, tvOS, iPadOS, audioOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed ...
project and is used in
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
X 10.5 and up for software installation routines, as well as browser extensions in
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
5.0 and up. Xar replaced the use of
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
ped pax files.Nabble – xar in Mac OS X
One development branch of
RPM Revolutions per minute (abbreviated rpm, RPM, rev/min, r/min, or r⋅min−1) is a unit of rotational speed (or rotational frequency) for rotating machines. One revolution per minute is equivalent to hertz. Standards ISO 80000-3:2019 def ...
, RPM5, uses xar.RPM 5 package manager
/ref>


File structure

The file consists of three sections, the header, the table of contents and the heap. All fields are stored in
big endian '' Jonathan_Swift.html" ;"title="Gulliver's Travels'' by Jonathan Swift">Gulliver's Travels'' by Jonathan Swift, the novel from which the term was coined In computing, endianness is the order in which bytes within a word (data type), word of d ...
order.


Header


Table of contents

Xar is different from
cpio cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer's Work ...
,
tar Tar is a dark brown or black viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. "a dark brown or black b ...
or ar in that it stores the TOC (table of contents) in the beginning of the file, making appending to an archive more complicated, but making it unnecessary to scan through the archive to extract an individual contained file. The table of contents is stored as a
zlib zlib ( or "zeta-lib", ) is a software library used for data compression as well as a data format. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compre ...
compressed,
UTF-8 UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8. UTF-8 supports all 1,112,0 ...
encoded, XML document. Each file that is stored in the Xar is independently compressed/encoded. This gives the ability to have the file(s) encoded using
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and ...
while having another file in the same archive encoded using a different method such as
bzip2 bzip2 is a free and open-source file compression program that uses the Burrows–Wheeler algorithm. It only compresses single files and is not a file archiver. It relies on separate external utilities such as tar for tasks such as handli ...
. On some systems the archive member can also be encoded by xz or
lzma The Lempel–Ziv–Markov chain algorithm (LZMA) is an algorithm used to perform lossless data compression. It has been used in the 7z format of the 7-Zip archiver since 2001. This algorithm uses a dictionary compression scheme somewhat similar ...
compression method. Example Table of contents 0 20 staff 20 joe 501 0755 directory com.foobar 20 501 0775 directory Contents 428 20 1005 a5f6f1461213a904f831d4ef6f214638342842ed 21d21a0c90378248ce0dfb6f345376d1b00d65fc 20 501 0664 file Info.plist 20 501 0775 directory Resources 14868 448 274432 efe5c97921de7ccc5aebc158d158e9d4280d6814 45c8be42d1d9afdb57ddd5e9311453010ec46161 20 501 0664 file foobar 17635 15316 45056 3c761ffcc81ee6e232e4f4a1c4a81654c26c4e52 0ea31f8ef0e5987a1838a64ab5c26ebf3ee4bc37 20 501 0664 file docSet.skidx 20 501 0775 directory Documents 35790 32951 209242 5242cd71585c34e722932f324706f8c00e1ae0c5 c0e013e53d829511835e2b429abb5198731e9a3e 20 501 0664 file foobar.html


References


External links


Original Xar project
(unmaintained)
fork from original project
(unmaintained) * Apple Archive formats {{storage-software-stub