Reference articles on history, science, culture and more
Encyclopedia

File archiver

Utility software for combining files

A file archiver is utility software that combines files into a single archive file , or in less common cases, multiple files. A relatively simple implementation might include the content of each file plus its name. A more advanced implementation stores additional metadata, such as the timestamps, file attributes and access control information. An archiver might compress input file content to reduce the size of the resulting archive.

In addition to creating an archive, the same utility may also support extracting the contained file content to recreate the original files.

01Multics

In the early days of computing, Multics provided the archive command , a basic archiver without compression , that descended from the CTSS command of the same name. Multics also provided a magnetic tape archiver command, ta, which was perhaps the forerunner of the Unix command tar.

02Unix

As the Unix archive tools ar, tar, and cpio do not provide compression, other tools, such as gzip, bzip2, or xz, are used to compress an archive file after it is created and to decompress before extracting.

Not only does separating archiving from compressing follow the Unix philosophy, that each tool should provide a single capability, not attempt to accomplish everything with one tool, it has the following advantages:

  • As compression technology progresses, users may use a different compression tool without having to change how they use the archiver.
  • Solid compression allows the compressor to take advantage of redundancy across the multiple archived files in order to achieve better compression than simply compressing each file individually.

Disadvantages include:

  • Extracting a single file requires decompressing the entire file, which can be costly in terms of time and storage space; adding a file to an existing archive requires both decompression and recompression.
  • The archive becomes damage-prone; corruption in any part of the file might cause all files to be lost.

A challenge:

  • Compression cannot take advantage of redundancy between files unless the compression window is larger than the size of an individual file; for example, gzip uses DEFLATE, which typically operates with a 32768-byte window, whereas bzip2 uses a Burrows-Wheeler transform roughly 27 times bigger; xz defaults to 8 MiB but supports significantly larger windows.

Generally, extensions are successively added to the file name to indicate the operations performed and therefore required to read a file. For example, archiving with tar command and then compressing with gzip command might be indicated with the .tar.gz extension.

03Windows

Archiving tools on Windows tend to have a graphical user interface (GUI) and to include compression , including the built-in Windows feature as well as commonly used, third-party tools such as WinRAR and 7-Zip. Unlike the built-in feature, WinRAR and 7-zip also provide a command-line interface (CLI) and solid compression.

Watch videos about File archiverExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article File archiver, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.