Archive File Recovery: How to Recover Deleted ZIP, RAR, 7Z, DMG, CAB, TAR, ISO & Compressed Files
Archive files are containers within containers. A single ZIP can hold hundreds of documents, photos, and spreadsheets. When you lose an archive, you lose everything inside it — or do you? Archive recovery has a unique advantage: the most common archive format (ZIP) was designed with data recovery in mind. Its central directory at the end of the file acts as a built-in backup index. See the complete file type overview.
Table of Contents
1. ZIP — The Most Recoverable Archive Format
The ZIP format specification (PKWARE APPNOTE) places the Central Directory at the end of the file. This is a brilliant design choice for recovery: even if the beginning of the ZIP file is partially overwritten, the Central Directory at the end can still be used to locate and extract all files. Additionally, each file entry within a ZIP has its own local header (PK\x03\x04), making individual files extractable even if the Central Directory is damaged. ZIP is also the internal structure of modern Office formats (DOCX, XLSX, PPTX) and OpenDocument formats (ODT, ODS) — meaning the same recovery advantages apply to these formats.
| Structure | Magic Number | Location |
|---|---|---|
| Local File Header | 50 4B 03 04 (PK..) | Before each file's data |
| Central Directory Entry | 50 4B 01 02 (PK..) | End of file |
| End of Central Directory (EOCD) | 50 4B 05 06 (PK..) | Very end of file |
2. RAR — Recovery Records & Solid Archives
RAR (Roshal Archive) has a sophisticated feature set including recovery records — optional redundant data that can repair minor corruption. RAR 5.0 format uses a different structure than earlier versions.
| Feature | RAR 4.x | RAR 5.0 |
|---|---|---|
| Magic Number | 52 61 72 21 1A 07 00 (Rar!...) | 52 61 72 21 1A 07 01 00 (Rar!....) |
| Recovery Records | Supported — adds 1-10% size overhead | Supported — improved algorithm |
| Solid Archives | All files compressed as one stream | Same — better compression but harder partial recovery |
Solid archive warning: In solid RAR archives, all files are compressed as a single data stream. Damage to any part of this stream can make all subsequent files unrecoverable. Non-solid archives treat each file independently — damage to one doesn't affect others. Always use non-solid mode for important backups.
3. 7Z, TAR, GZ, DMG, ISO & Others
| Format | Magic Number | Key Recovery Characteristic |
|---|---|---|
| 7Z | 37 7A BC AF 27 1C | 7-Zip format — open source, well-documented. Signature at start of file. |
| GZ (gzip) | 1F 8B 08 | Single-file compression only. RFC 1952. Simple structure, easy to recover. |
| TAR | 75 73 74 61 72 (ustar) at byte 257 | POSIX tar format. Archive only (no compression) — just concatenated files. |
| DMG (Apple Disk Image) | 78 01 73 0D 62 62 60 | Mac disk image. Contains HFS+/APFS file system. Complex recovery. |
| ISO 9660 | 43 44 30 30 31 (CD001) at sector 16 | Optical disc image. ISO 9660 standard. Well-structured. |
| CAB | 4D 53 43 46 (MSCF) | Microsoft Cabinet format. Used for Windows installers and updates. |
4. Recover Archives with XRecovery
XRecovery recognizes all major archive signatures and can recover ZIP, RAR, 7Z, TAR, GZ, DMG, ISO, CAB, and more. See the complete format matrix.
- Download XRecovery to a different drive.
- Select the drive → Deep Scan (archive files are often large and may be fragmented).
- Filter by Archive category. ZIP files are identified by their
PKheader, RAR byRar!. - After recovery, verify the archive can be opened. Try extracting a few files to confirm integrity. If the archive reports errors, use the archive tool's built-in repair function (WinRAR: Tools→Repair; 7-Zip: Test).
- Recover to a different drive. XRecovery tutorial.
Lost a ZIP Full of Important Files? Recover It.
XRecovery finds archive files by their signatures. ZIP, RAR, 7Z, ISO — all supported. Free scan.
Download XRecovery FreeFAQ
Why is ZIP the most recoverable archive format?
ZIP stores its Central Directory (index of all files) at the end of the file. If the beginning is damaged, the end can still reconstruct everything. ZIP specification.
Can I recover files from inside a corrupted ZIP?
Each file in a ZIP has its own local header (PK\x03\x04). Individual files may be extractable even if the Central Directory is damaged. For RAR: use WinRAR's Repair function if recovery records were enabled.
Backups. Installers. Archives. Recover Everything.
XRecovery recovers all archive formats. Free scan.
Download XRecovery Free