Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Feature request: Unzipping for incomplete/corrupt zip files

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19916 |

    I have a backup file from a client that they compressed using our software. When trying to decompress it they find that the backup file is corrupt. I just started digging into the issue a bit more and found that the exception thrown was something like “zip end signature not found” so it looks like the file got truncated at some point.

    Using some zip recovery software it looks like I’ll be able to extract all by the last file perfectly. The last file appears to be truncated to 34% of it’s original size.

    Is there any way that could be handled automatically in Xceed Zip or through my code using the zip libraries in a more low-level way? I wish I could make our software warn them of the corruption and then extract as much data as possible from the zip file. It appears that when the file is truncated there’s still enough info left in the header to know all the file names and their offsets so the end signature isn’t truly “required” in the absolute sense.

    I haven’t looked into all the new features, I implemented our program using what is now an older version of the libraries. Maybe it already has this now, if so can you tell me where to find more info?

    Thanks.

    Imported from legacy forums. Posted by stevehiner (had 2698 views)

    Xceed Support
    Member
    Post count: 5658

    You could use one of our other product (<a href=”http://xceed.com/ZipRT_Net_Intro.html”>Real-Time Zip</a>) to get to the same kind of result. Real-Time Zip does not take into account the Central Header. So, you could access to all the data in a sequential order to recover all the files.

    Imported from legacy forums. Posted by CharlesB (had 221 views)

    User (Old forums)
    Member
    Post count: 23064

    That is great info. I bought the Ultimate Suite back before you had that component and though I have a current subscription I’ve never really researched it. Thanks for the tip.

    This is especially interesting to me because after zipping the files I encrypt them using a stream. It looks like RTZip will let me do it all at once by just passing the zip stream into the encryption stream the way I wanted to do it 4 years ago but couldn’t.

    Uh oh, just noticed it’s 2.0 only. Oh well, that’s one more reason to push me toward upgrading my code to 2.0. I just hate the idea of telling half my users that they need to install yet another framework; especially one that takes 30 minutes or more to install on some systems.

    Thanks again for the info. Maybe I’ll write a backup recovery utility for the users and they’ll just have to install 2.0 to make it work.

    Imported from legacy forums. Posted by stevehiner (had 3972 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.