15

Repairing Corrupt ZIP Files – text/plain

 4 years ago
source link: https://textslashplain.com/2015/12/15/repairing-corrupt-zip-files/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Repairing Corrupt ZIP Files

Fiddler’s default file format is the SAZ Format, which is just a ZIP file with a particular structure. Unfortunately, sometimes users’ SAZ files get corrupted due to failing disks or incomplete downloads, and when this happens, Fiddler can no longer open them.

Corrupt Archive dialog

Because Fiddler uses a standard ZIP file, surely a good ZIP reader will be able to read some data, right?

Windows Explorer’s primitive ZIP implementation can’t do anything useful:

Windows Cannot Open dialog

Alas, not even 7-zip offers any help.

Cannot Open dialog

Okay, well, surely you can just use any of the many ZIP Repair tools to extract the data that isn’t corrupt from the file, right?

Alas, a few hour’s worth of research suggests that almost all of the public ZIP repair tools are terrible, unable to handle most forms of corruption. Some claim to work, but the resulting “repaired” archive remains unreadable:

Error 0x800040005 Unspecified Error when extracting

Those tools that seem promising aren’t free, and require spending $30 or so before you can even determine whether they’ll get your data back.

What to do?

Write my own, of course. Most SAZ files are internally quite simple, and it shouldn’t be too hard to recover most data from archives that aren’t encrypted.

Fiddler 4.6.2 will offer a Repair Corrupt option on the dropdown in the Load dialog box:

Repair Corrupt option

When you choose this option, Fiddler will enter its archive recovery mode:

Explanation of recovery process

Notably, the recovery mode doesn’t especially care whether the recovered ZIP file is a SAZ file. If not, Fiddler will alert you that the file couldn’t be interpreted as a SAZ:

Fiddler Alert - Not A SAZ

… but the repaired file on your desktop:

image

… should now be openable by your ZIP reader of choice:

Windows Explorer View

I hope you find this new capability useful, both for Fiddler-generated files as well as any other corrupt ZIP or ZIP-based (e.g. docx, pptx) files you may encounter.

-Eric Lawrence

Posted byericlaw2015-12-15Posted intechTags:corruption, data, Fiddler, SAZ, zip

Published by ericlaw

Impatient optimist. Dad. Author/speaker. Created Fiddler & SlickRun. PM @ MSFT '01-'12, and '18-, presently working on Microsoft Edge. My words are my own. View more posts

Post navigation

One thought on “Repairing Corrupt ZIP Files”

  1. 0ef3984bb7f5bda78a863f0e9317d82f?s=32&d=identicon&r=GPeter Richter

    The year is 2030. Fiddler can now repair microwaves, cure diabetes, and exhibit strong AI. 20 years of continually adding new features (such as ZIP corruption recovery) have inadvertently constructed the most powerful tool in the observable universe. Debugging is now obsolete. Congratulations, Mr. Lawrence.

    …Seriously, this is pretty cool. Thanks, and looking forward to the update!

Leave a Reply Cancel reply


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK