Can Unrar Extract Corrupted Dictionary Archives?

Extracting files from a RAR archive that suffers from a corrupted compression dictionary is generally not possible without data loss, as the decompression algorithm relies directly on historical dictionary states to decode subsequent bytes. However, depending on whether the archive is solid or non-solid, whether a recovery record exists, and whether you force extraction using specific command switches, you can often recover unaffected files or salvage partial, damaged data.

How Dictionary Corruption Affects Extraction

RAR compression relies on sliding dictionary algorithms (LZ-based compression). During decompression, unrar references previously unpacked data within the dictionary window to reconstruct new data.

If the data defining the dictionary becomes corrupted:

  • Loss of Synchronization: The decompression engine encounters invalid back-references or corrupted Huffman tables, triggering a checksum mismatch or an abrupt extraction failure.
  • Cascading Errors: Any data compressed after the point of dictionary corruption cannot be accurately decoded because the algorithm is referencing invalid historical state data.

Solid vs. Non-Solid Archives

The structural type of the archive determines how widespread the damage will be:

  • Non-Solid Archives: Each file maintains its own independent compression dictionary. If one file has a corrupted dictionary, unrar will fail on that specific file, but all other files in the archive can be extracted normally.
  • Solid Archives (-s): Multiple files are treated as a single continuous data stream sharing a continuous dictionary. If corruption occurs early in the stream, the dictionary state is permanently broken for that file and every subsequent file in the archive. Any files located physically before the corruption point can still be extracted successfully.

Extracting Partial Data with the Keep Broken Flag

By default, unrar aborts decompression and deletes the partially extracted file when it detects a dictionary or CRC error. You can override this behavior using the -kb (Keep Broken) switch:

unrar x -kb archive.rar

This command instructs unrar to retain the file up to the exact byte where the dictionary failed. While the resulting file will be truncated or internally corrupted, partial recovery is often sufficient for raw text, uncompressed media streams, or non-critical assets.

Using the Built-In Recovery Record

If the archive was originally created with recovery records, unrar can mathematically reconstruct the missing or damaged dictionary data using Reed-Solomon error correction:

unrar r archive.rar

If successful, this process generates a repaired archive (fixed.archive.rar) with restored dictionary integrity, allowing a clean, error-free extraction. If no recovery record was embedded at creation time, true dictionary reconstruction is mathematically impossible.