ZipInputStream examples?

Jun 28, 2011 at 3:29 PM


Can anyone tell me where I can find examples(if they exist) for extracting files using ZipInputStream?


Jun 28, 2011 at 10:38 PM

so I found this example on the site:


I am using code that is very similar to what's in the example.. but when my code reaches the line:

while ((currentEntry = zipInputStream.GetNextEntry()) != null)

for the last time it's throwing the following exception:

ZipEntry::ReadHeader(): Bad signature (0xB8439D9F) at position  0x0000042B

Now even after I get this exception, it seems like the file was still unzipped just fine..

Any ideas?


Jul 1, 2011 at 5:49 PM


Jul 5, 2011 at 1:41 AM

The documentation includes examples - you found the main one.

As regards the problem you are seeing, it generally means there was a zipentry that was not valid. Depending on how you handle the exception (catch and retry, move to next entry, etc), it could be that you would extract the other, non-corrupted entries. 

This is just a guess, not having seen your code or the zipfile itself.