Dictionary

What Is The Uncompressed Size In A RAR File?

Uncompressed Size is the size a file in a RAR archive will have after you extract it. Find out where the number comes from and what it tells you.

uncompressed-size

Uncompressed Size is the size of a file after you extract it from an archive. A RAR archive stores this number for each file it holds.

Next to Uncompressed Size, the archive stores the compressed size, which is the space the file takes up inside the archive. ZIP archives store the same kind of number, and the metadata reader ExifTool shows it as ZipUncompressedSize. See the article on the ZIP uncompressed size.

Which files carry it

Uncompressed Size comes from RAR archives, in both the older RAR 4.x format and the newer RAR 5.0 format. Each file inside the archive has its own header, and that header holds the unpacked size of the file.

The same header also holds the archived file name and the operating system used to create the archive. It can also hold the modification date. Because every file has its own header, an archive with 10 files can carry 10 Uncompressed Size values.

ExifTool, a program that reads metadata, shows only 1 Uncompressed Size by default. Its Duplicates option shows the values for every file in the archive.

Where the value comes from

The archiving program writes the number into the header when it adds a file to the archive. In RAR 5.0, the header stores the unpacked size as a variable-length integer of up to 64 bits.

The header can also store a CRC32 checksum of the unpacked data. This field is optional, so a file header may not contain it.

A RAR 5.0 archive can mark the unpacked size of a file as unknown. A program must then ignore the stored number and keep extracting until the compressed data ends. ExifTool does not show Uncompressed Size for such a file.

What the value looks like

The value is a whole number of bytes, without a unit. Programs often convert this number into larger units, but they do not all use the same rule:

  • 1 kB (kilobyte) is 1,000 bytes, and 1 MB (megabyte) is 1,000,000 bytes.
  • 1 KiB (kibibyte) is 1,024 bytes, and 1 MiB (mebibyte) is 1,048,576 bytes.

Some programs write KB or MB but mean 1,024 bytes or 1,048,576 bytes. This is why 2 programs can show different sizes for the same file.

Why it matters

Uncompressed Size tells you about how much free disk space you need before you extract an archive. Add up the values of all files in the archive to get a rough total.

Uncompressed Size is different from the file size of the archive. The file size is the number of bytes in the whole RAR file.

Compare Uncompressed Size with the compressed size to see how much compression saved for each file. If the 2 numbers are almost the same, the archive saved little space for that file. In RAR 4.x archives, the packing method Stored means the file was saved without compression.

The number is only what the archive declares. Be careful with a very small archive that declares a huge uncompressed size. It can be a decompression bomb, also called a zip bomb, which can produce a large amount of data when someone extracts it.