In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, an archive file is a
computer file
A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and trans ...
that is composed of one or more files along with
metadata. Archive files are used to
collect
The collect ( ) is a short general prayer of a particular structure used in Christian liturgy.
Collects appear in the liturgies of Catholic, Eastern Orthodox, Oriental Orthodox, Anglican, Methodist, Lutheran, and Presbyterian churches, among o ...
multiple data files together into a single file for easier
portability
Portability may refer to:
*Portability (social security), the portability of social security benefits
* Porting, the ability of a computer program to be ported from one system to another in computer science
** Software portability, the portability ...
and storage, or simply to
compress files to use less storage space. Archive files often store
directory structures,
error detection and correction
In information theory and coding theory with applications in computer science and telecommunication, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable comm ...
information, arbitrary comments, and sometimes use built-in
encryption
In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can dec ...
.
Applications
Portability
Archive files are particularly useful in that they store
file system
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one lar ...
data and
metadata within the contents of a particular file, and thus can be stored on systems or sent over
channels that do not support the file system in question, only file contents – examples include sending a
directory structure over
email
Electronic mail (email or e-mail) is a method of exchanging messages ("mail") between people using electronic devices. Email was thus conceived as the electronic ( digital) version of, or counterpart to, mail, at a time when "mail" mean ...
, files with names unsupported on the target file system due to length or characters, and
retaining files' date and time information.
Additionally, it facilitates transferring high numbers of small files such as resources of saved web pages, since a container file is transferred using a single
file operation, whereas transferring many small files requires the computer to modify the file system structure for each file individually, making it considerably slower.
Software distribution
Beyond archival purposes, archive files are frequently used for packaging software for
distribution Distribution may refer to:
Mathematics
*Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations
*Probability distribution, the probability of a particular value or value range of a varia ...
, as software contents are often naturally spread across several files; the archive is then known as a
''package''. While the archival file format is the same, there are additional conventions about contents, such as requiring a
manifest file A manifest file in computing is a file containing metadata for a group of accompanying files that are part of a set or coherent unit. For example, the files of a computer program may have a manifest describing the name, version number, license and t ...
, and the resulting format is known as a
package format. Examples include
deb for
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
,
JAR for
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
,
APK for
Android
Android may refer to:
Science and technology
* Android (robot), a humanoid robot or synthetic organism designed to imitate a human
* Android (operating system), Google's mobile operating system
** Bugdroid, a Google mascot sometimes referred to ...
, and
self-extracting Windows Installer
Windows Installer (msiexec.exe, previously known as Microsoft Installer, codename Darwin) is a software component and application programming interface (API) of Microsoft Windows used for the installation, maintenance, and removal of softwar ...
executables.
Features
Features supported by various kinds of archives include:
* converting
metadata into data stored inside a file (e.g., file name, permissions, etc.)
*
checksum
A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify dat ...
s to detect errors
*
data compression
In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compressi ...
* file concatenation to store multiple files in a single file
* file patches / updates (when
recording changes since a previous archive)
*
encryption
In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can dec ...
*
error correction code
In computing, telecommunication, information theory, and coding theory, an error correction code, sometimes error correcting code, (ECC) is used for controlling errors in data over unreliable or noisy communication channels. The central idea i ...
to fix errors
*
splitting a large file into many equal sized files for storage or transmission
Some archive programs have self-extraction, self-installation, source volume and medium information, and package notes/description.
The
file extension or
file header of the archive file are indicators of the
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 ...
used. Computer archive files are created by
file archiver
A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage. File archivers may employ lossless data compression in their archive formats ...
software,
optical disc authoring software, and
disk image
A disk image, in computing, is a computer file containing the contents and structure of a disk volume or of an entire data storage device, such as a hard disk drive, tape drive, floppy disk, optical disc, or USB flash drive. A disk image is usu ...
software.
Archive formats
An archive format is the
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 an archive file. Some formats are well-defined by their authors and have become conventions supported by multiple vendors and communities.
Types
* Archiving only formats store
metadata and
concatenate
In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenat ...
files.
* Compression only formats only compress files.
* Multi-function formats can store
metadata, concatenate, compress, encrypt, create error detection and recovery information, and package the archive into self-extracting and self-expanding files.
* Software packaging formats are used to create
software packages that may be self-installing files.
* Disk image formats are used to create
disk image
A disk image, in computing, is a computer file containing the contents and structure of a disk volume or of an entire data storage device, such as a hard disk drive, tape drive, floppy disk, optical disc, or USB flash drive. A disk image is usu ...
s of mass storage volumes.
Examples
Filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically ...
s used to distinguish different types of archives include
zip
Zip, Zips or ZIP may refer to:
Common uses
* ZIP Code, USPS postal code
* Zipper or zip, clothing fastener
Science and technology Computing
* ZIP (file format), a compressed archive file format
** zip, a command-line program from Info-ZIP
* Zi ...
,
rar RAR or Rar may refer to:
* Radio acoustic ranging, a non-visual technique for determining a ship's position at sea
* "rar", the ISO 639-2 code for the Cook Islands Māori language
* RAR (file format), a proprietary compressed archive file format in ...
,
7z, and
tar
Tar is a dark brown or black viscosity, viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic matter, organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. ...
, the first of which is the most widely implemented.
Java also introduced a whole family of archive extensions such as
jar and
war (''j'' is for Java and ''w'' is for web). They are used to exchange entire byte-code deployment. Sometimes they are also used to exchange source code and other text, HTML and XML files. By default they are all compressed.
Error detection and recovery
Archive files often include
parity checks and other
checksum
A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify dat ...
s for
error detection
In information theory and coding theory with applications in computer science and telecommunication, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable communic ...
, for instance
zip files use a
cyclic redundancy check (CRC).
RAR archives may include additional
error correction data (called recovery records).
Archive files that do not natively support recovery records can use separate
parchive (PAR) files that allows for additional error correction and recovery of missing files in a multi-file archive.
See also
*
File archiver
A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage. File archivers may employ lossless data compression in their archive formats ...
*
Disk image
A disk image, in computing, is a computer file containing the contents and structure of a disk volume or of an entire data storage device, such as a hard disk drive, tape drive, floppy disk, optical disc, or USB flash drive. A disk image is usu ...
*
Digital container format, a similar concept in media files
References
"Application Note on the .ZIP file format" official white paper published by PKWARE, Inc.
Tape Archive (.TAR) file format specification excerpt from File Format List 2.0 by Max Maischein
from IBM Archives
from IBM Archives
External links
*
{{Archive formats
Computer files
Computer archives
Computer file systems
Disk images
Records management