RAR

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
 
|formattype=electronic
 
|formattype=electronic
 
|subcat=Archiving
 
|subcat=Archiving
|extensions={{ext|rar}}
+
|extensions={{ext|rar}}, {{ext|r00}}, ...
 
|mimetypes={{mimetype|application/vnd.rar}}, {{mimetype|application/x-rar-compressed}}
 
|mimetypes={{mimetype|application/vnd.rar}}, {{mimetype|application/x-rar-compressed}}
 
|pronom={{PRONOM|x-fmt/264}}, {{PRONOM|fmt/411}}, {{PRONOM|fmt/613}}
 
|pronom={{PRONOM|x-fmt/264}}, {{PRONOM|fmt/411}}, {{PRONOM|fmt/613}}
Line 28: Line 28:
 
=== Overview of DOS releases ===
 
=== Overview of DOS releases ===
 
RAR v2.50 (1999-03-24) was the last one for traditional 16-bit DOS. After that came versions 2.60 through 3.93, which use a 32-bit DOS extender. These versions are sometimes called "RAR32", though their actual name is still "RAR".
 
RAR v2.50 (1999-03-24) was the last one for traditional 16-bit DOS. After that came versions 2.60 through 3.93, which use a 32-bit DOS extender. These versions are sometimes called "RAR32", though their actual name is still "RAR".
 +
 +
== Self-extracting archives ==
 +
RAR supports creating self-extacting archives. This is sometimes done simply by appending a RAR file to a pre-made "executable stub". Multiple stubs, or even customized stubs, may be available, so it's difficult to classify all of the RAR self-extracting archive formats. Distributions of RAR often include one or more stubs in files with an '''.SFX''' extension, though note that there may be additional stubs that are built into the software.
 +
 +
For the 16-bit DOS stubs, the decompressor is [[MS-DOS EXE|EXE]]-based, and is pre-compressed with [[LZEXE]]. The ASCII signature "<code>RSFX</code>"  (instead of LZEXE's usual "<code>LZ91</code>") appears at offset 28.
 +
 +
While "<code>RSFX</code>" is indicative of a RAR self-extracting archive, it is not unique to the LZEXE-based formats, and it does not appear in all EXE-based RAR self-extracting archives.
 +
 +
=== Installation SFX ===
 +
For at least RAR v1.54 through 2.50, an "installation SFX module" is available, in the included IDOS.SFX file. This stub features a script interpreter that processes a script stored in what would normally be the archive comment field. For an example RAR installation script, see the STANDARD.S file included with these versions.
  
 
== File identification ==
 
== File identification ==

Revision as of 18:08, 23 July 2022

File Format
Name RAR
Ontology
Extension(s) .rar, .r00, ...
MIME Type(s) application/vnd.rar, application/x-rar-compressed
PRONOM x-fmt/264, fmt/411, fmt/613
Wikidata ID Q243303
Kaitai Struct Spec rar.ksy
Released 1993

RAR (Roshal Archive) is a compressed archive format used by the compression software RAR and WinRAR. It was originally for DOS, but has been widely used on Windows (as WinRAR) and other platforms.

The developers make the decompression code available for use in other programs and allow its distribution, but with a license provision that "You cannot use the unrar source to re-create the RAR compression algorithm, which is proprietary."

Contents

Discussion

Format classification

RAR can be considered to be a family of three main file formats:

  • The (obsolete) format used by RAR before v1.50
  • The format associated with RAR v1.50 through v4.x
  • "RAR 5.0" format

Even within one of these classes, there can be significant differences between different RAR versions.

Early history

Most of the earliest releases of RAR appear to be lost. Version 1.34 beta (1993-12-05) seems to be the oldest one known to still exist as of this writing, but there were likely about a dozen earlier releases, starting with v0.1 in 1993-03[1]. Of those that can be found, the first non-beta release seems to be v1.51 (1994-06-17).

Overview of DOS releases

RAR v2.50 (1999-03-24) was the last one for traditional 16-bit DOS. After that came versions 2.60 through 3.93, which use a 32-bit DOS extender. These versions are sometimes called "RAR32", though their actual name is still "RAR".

Self-extracting archives

RAR supports creating self-extacting archives. This is sometimes done simply by appending a RAR file to a pre-made "executable stub". Multiple stubs, or even customized stubs, may be available, so it's difficult to classify all of the RAR self-extracting archive formats. Distributions of RAR often include one or more stubs in files with an .SFX extension, though note that there may be additional stubs that are built into the software.

For the 16-bit DOS stubs, the decompressor is EXE-based, and is pre-compressed with LZEXE. The ASCII signature "RSFX" (instead of LZEXE's usual "LZ91") appears at offset 28.

While "RSFX" is indicative of a RAR self-extracting archive, it is not unique to the LZEXE-based formats, and it does not appear in all EXE-based RAR self-extracting archives.

Installation SFX

For at least RAR v1.54 through 2.50, an "installation SFX module" is available, in the included IDOS.SFX file. This stub features a script interpreter that processes a script stored in what would normally be the archive comment field. For an example RAR installation script, see the STANDARD.S file included with these versions.

File identification

RAR files made by versions prior to v1.50 start with bytes 52 45 7e 5e.

RAR files associated with versions 1.50 through 4.20 start with 7 signature bytes: 52 61 72 21 1a 07 00.

"RAR 5.0" format starts with 8 signature bytes: 52 61 72 21 1a 07 01 00.

Specifications

Before v1.50:

  • RAR140DC.EXE (self-extracting RAR archive) → technote.doc

v1.50-4.20:

  • wrar420.exe (self-extracting RAR archive) → TechNote.txt

5.0 format:

Various:

Software

Sample files

Links

References

  1. Discussion at [1]
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox