Resilience of WinRar format for storage

Your idea is good for speed but cannot be answered directly as the file format of a rar archive is not documented. As a rar archive is able to contain a hierarchical file structure and file metadata, a rar archive is a file system itself, like an ISO file for instance.

Depending on its internal organisation it is prone to dammage if it organizes file positions in a FATxx (file allocation table) manner which is prone to direct hits like the reactor trench in Star Wars I or much better like in NTFS (cluster lists in individual MFT entries).

The Winrar documentation does not state anything about the content being equally resilient against losses.

Then Winrar help file states: [... The recovery record contains up to 524288 recovery sectors. If data is damaged continuously, then each recovery sector is able to recover 512 bytes of damaged information. This value may be lower in cases of multiple damage. ...]

and [... The recovery record increases the size of an archive. The size of the recovery record may be approximately determined by the formula:

{archive size}/256 + {number of recovery sectors} * 512 bytes. ...]

Your talking about a size of 50MB. With today's drives with a physical sector size of 4096 bytes regardless of 512 byte emulation we are talking about a storage need of 12500 sectors for your file. How high do you consider the probability of a non-continuous double sector loss in your group of 12500 sectors?

To find out, you might want to test that case as follows:

  1. Pack your archive
  2. Zero out two non-continuous sectors (two 4096 byte areas) in your file
  3. Repair it
  4. Unpack it
  5. Compare with your source.

Keep in mind that the data of a file is not necessarily stored at the beginning of a physical sector (p.e. NTFS files start with the magic word "FILE", followed by other information before the data section with the file data beginns).

21.5.2020: replaced the "bigger than" and "smaller than" symbols by brackets because they were hiding the the content of the formula


The previous answer contains an outdated information about Winrar recovery record. That information is only true for RAR 4.x and older versions. RAR 5.0 has new recovery record.

The version 5.00 changelog states:

"New recovery record is not based on 512 byte sectors anymore and incorporates more complicated data structures. So it is impossible to specify its size in sectors. For RAR 5.0 archives the parameter of -rr[N] switch and rr[N] command is always treated as a percent of archive size regardless of presence of % character. Typically N% recovery record can repair up to N% of continuously damaged data and increases the archive size by only slightly more than N%. Ability to fix multiple damages is proportional to N."

Source (scroll down to Version 5.00): https://www.rarlab.com/rarnew.htm