The Compressed (zipped) Folder is invalid or corrupted with SharpZipLib
I have generated Zip File using SharpZipLib. But when i try to access it using Windows XP extraction tool it shos following error: Compressed (zipped) Folder is invalid or corrupted and it worked fine with 7zip. So, i did googling and found one nice solution from this link : http://blog.tylerholmes.com/2008/12/windows-xp-unzip-errors-with.html
Solution is — extracted from the above blog only.
... ZipEntry entry = new ZipEntry(Path.GetFileName(sourceFilePath)); entry.DateTime = DateTime.Now; /* By specifying a size, SharpZipLib will turn on/off UseZip64 based on the file sizes. If Zip64 is ON * some legacy zip utilities (ie. Windows XP) who can't read Zip64 will be unable to unpack the archive. * If Zip64 is OFF, zip archives will be unable to support files larger than 4GB. */ entry.Size = new FileInfo(sourceFilePath).Length; zipStream.PutNextEntry(entry); ...
If it works say thanks to Tyler Holmes — Above Blog author, for such a nice article!