File archiver

From Wikipedia, the free encyclopedia

Jump to: navigation, search

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. Many file archivers use lossless data compression in order to reduce the archive's size.

The most basic archivers just take a list of files and concatenate their contents sequentially into the archive. In addition the archive must also contain some information about at least the names and lengths of the originals, so that proper reconstruction is possible. Most archivers also store meta-data about a file that the operating system provides, such as timestamps, ownership and access control.

The process of making an archive file is called archiving or packing. Reconstructing the original files from the archive is termed unarchiving, unpacking or extracting.

Contents

[edit] Popular archive formats

Ubiquitous amongst Unix and Unix-like operating systems is the tar file format ("tape archive"). Originally intended for transferring files to and from tape, it is still used on disk-based storage to combine files before they are compressed. Other Unix-originated formats include ar and shar.

On Windows platforms, the most widely-used archive format by far is ZIP; other popular formats are CAB, RAR, HKI and ACE. On Amigas, the standard archive format is LHA, while on Apple Macintosh computers, StuffIt is among the most common, with Zip also supported natively in recent OS X (10.3+).

[edit] Unix

Unlike integrated archival and compression tools like ZIP and RAR, the Unix tools ar, tar, cpio (for "archiver", "tape archiver" and "copy in/out" respectively) act as archivers but not compressors. Users of the Unix tools typically add compression by compressing the result of packing (and uncompressing before unpacking), most often using the gzip or bzip2 programs. In fact modern tar programs include an option to automatically call a (de)compression program, so that it looks just as if tar itself could handle compressed archives. This approach has two advantages:

  • It follows the Unix toolbox concept that each program should accomplish a single but well-done task. Once a better compressor is developed, users may use that immediately, without having to give up their archiver.
  • Since the whole archive is compressed, redundancy between archived files can be detected and eliminated. An archiver compressing each archived file in isolation cannot exploit these inter-file redundancies.

Its main disadvantage is that extracting one file from a compressed archive requires all the files before it to be decompressed, which may take many minutes for a large archive. Altering the underlying archive is even more inconvenient, requiring the entire file to be uncompressed, altered and then recompressed. Archivers with integrated compression perform these operations much more quickly.

[edit] See also

[edit] External links

Personal tools