Verify extracted files

Apr 22, 2010 at 11:49 PM


First - AMAZING library!!

Second, is there a 'best practice' to validate the extracted file by code?

Im sorry if thsi subject was already discussed, I couldnt find any reference...




Apr 23, 2010 at 10:32 PM

Yes, there's a ZipFile.CheckZip method - try it.

Apr 24, 2010 at 1:26 AM

I'm actually asking about the extracted file - verify if was extracted fully and correctky.


Apr 24, 2010 at 10:34 AM

The ZIP format has a CRC in it, for each entry, which is checked automatically when you extract an entry.  If the extract succeeds in DotNetZip, then the CRC has been checked and verified for that entry.  If the CRC check fails, DotNetZip throws an exception.

If you need something more than that, then you'll have to implement it yourself - something like a before-and-after MD5 hash, or whatever you like.

Apr 25, 2010 at 3:21 AM

Great, the CRC is good enough for my needs.