Jump to content

RAR (file format)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 203.206.137.129 (talk) at 12:31, 28 January 2008 (rar does not support tapes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

RAR
File:Rar.png
RAR 2.50 for DOS and OS/2
Filename extension
.rar
Internet media type

application/x-rar-compressed

application/octet-stream
Developed byEugene Roshal
Type of formatData compression

In computing, RAR is a proprietary file format for data compression and archiving, developed by Eugene Roshal (hence the name RAR: Roshal ARchive).

The filename extension used by RAR is .rar. If a RAR-archive is broken into many smaller files (a "multi-volume archive"), as is often the case when it was distributed on Usenet, then those smaller files carry the extensions .rar, .r00, .r01, .r02 etc. and most unrar programs reconstruct the whole archive when provided with the .rar file.

Availability of archiver and unarchiver

Roshal created the RAR file format and developed programs for packing and unpacking RAR files, originally for DOS, which were later ported to other platforms. The main Windows version of the archiver, known as WinRAR, is distributed as shareware; shareware versions of this program are also available for Linux, Mac OS X, DOS, OS/2, and FreeBSD, though they are all called simply "RAR".

RARLAB also distributes the source code and binaries for a free command-line "unrar" program, although it is not under a free software license. There is a free software decompression library called "unrarlib", licensed under the GPL, based on an old version of unrar with permission from the author Eugene Roshal. This library is used by many free-software archivers. However, it can only decompress archives created by RAR versions up to 2.x. Archives created by RAR 2.9 and later (which are most RAR archives found today) use a different format which is not supported by the free-software library.

The mostly free software archiver 7-Zip uses a proprietary plugin under the non-free "unRAR license" for decompression of newer RAR files.

Comparison to other compression algorithms

Note that compression performance is hard to compare, as it heavily depends on the kind of data being compressed. The statements in this paragraph apply to "typical" data (text, software binaries, productivity software files). See also the section on efficiency in Comparison of file archivers.

RAR compression operations are typically much slower than compressing the same data with early compression algorithms like ZIP and gzip, but with a much better rate of compression.

7z's LZMA algorithm is quite similar to RAR in providing extremely high compression efficiency at the cost of compute time to compress and decompress. Both provide among the highest compression efficiency of any popular scheme, with the question of which algorithm is the more efficient compression scheme strongly depending on the files being compressed. Both formats are still being actively developed.

Archiver features

Apart from the rate of compression, RAR has several other original features:

  • It is able to handle efficiently split volumes. Before the advent of RAR the most notable such format was ARJ. It is unnecessary to use split volumes for this purpose alone since just binary splitting the files will work fine, and they can be reassembled with cat or binary copy. Multi-volume files have wide use though, mainly because they are generally easier to handle, especially when the file is spanning multiple disks. Built-in support for multi-volume files enable the unpacking program to simply prompt the user for the next disk, without any hassle of manually copying and then rejoining the pieces, or for extracting a file from a single piece without needing all pieces. Unfortunately, RAR does not support tapes, as it uses seek and rename operations on its files.
  • Variable amounts of redundancy (“recovery record”) can be added to an archive, making it more resistant to corruption. Even if parts of an archive are damaged, it is possible to fully recover the stored data if a large enough recovery record exists.
  • RAR archives can be of a solid format, in which all of the compressed files are treated as a single data block. Most currently used compression formats (with the exception of the older ZIP) allow solid structuring.
  • It features strong encryption capabilities. Older versions of the file format used a proprietary algorithm; newer versions use the AES encryption algorithm, a block cipher adopted as an encryption standard by the U.S. government. The only known ways to recover an encrypted file are via dictionary or brute force attacks, which are usually infeasible with non-dictionary passphrases starting from 8 characters.
  • In newer versions password protection can optionally protect filenames too, so that the files contained within the archive will not be displayed without the right password.
  • (Win)RAR also has the capability of storing NTFS streams and security information within the archive – information that is usually lost on compression. Under OS/2 RAR also handles extended attributes.
  • Windows versions (WinRAR) starting from 3.60 have support for multi-threading, enabling the utilization of multiple CPUs/cores for parallel processing.
  • Versions of RAR up to 2.50 closely resemble earlier versions of Norton Commander.
  • RAR files can be embedded in other file types, probably the most common being JPEG. Image handling programs, browsers, and other utilities usually ignore any additional data after the end of the image, while RAR ignores anything before the RAR header. The procedure to create such a file is to append a RAR file to a JPEG. (e.g.: in DOS/Windows command-line: copy /b image1.jpg+something.rar image2.jpg, in UNIX: cat image1.jpg something.rar >> image2.jpg). [1]

MIME Type

Apache lists the default MIME-type for RAR files as application/x-rar-compressed.

See also

  • Official RAR site, containing archivers for several platforms
  • BitZipper is an archiving utility for Windows that supports unpacking (but not packing) RAR files, as well as other formats.
  • UnRarX – UnRar for Mac OS X
  • SimplyRAR – Freeware RAR compressor for Mac OS X
  • unrarlib – a library for decoding RAR (version 2) archives based on the Roshal's code, is GPL compatible
  • unrar – an unrar utility for unix using unrarlib above
  • RarZilla Free Unrar – a simple Freeware Windows tool for decoding RAR archives
  • 7-Zip an open source windows file archiver that supports unpacking (but not packing) RAR files, as well as other formats. (Note that the RAR unpacking part is not free software but under a proprietary "unRAR license").
  • TUGZip is a powerful award-winning freeware archiving utility for Windows that supports unpacking (but not packing) RAR files, as well as other formats.
  • Zipeg freeware windows and macintosh file unarchiver that supports unpacking (but not packing) of RAR files, as well as other formats.
  • Peazip open source file archiver for Windows and Linux that supports unpacking (but not packing) RAR files, as well as other formats.
  • RAR player free tool to play avi movies from rar archives.