![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Reading partial/corrupt zip filesby abcde (Scribe) |
on Jan 01, 2006 at 12:11 UTC ( #520230=note: print w/replies, xml ) | Need Help?? |
I am not sure of any library that can read corrupted files, but it might be possible to turn an incomplete file into a complete one, adding a phony footer and removing the last file. Look at the ZIP file format: http://www.pkware.com/business_and_developers/developer/appnote/ The files in the zip are not connected to each other, so it is possible to read through the file, parsing each file as it comes and bailing out if the file ends unexpectedly:
My code doesn't actually produce a correct footer for the file, but it should start you off.
In Section
Seekers of Perl Wisdom
|
|