ZipArchive icon indicating copy to clipboard operation
ZipArchive copied to clipboard

zip archive cannot be read using SharpZipLib in C#

Open silverhammermba opened this issue 4 years ago • 1 comments

Updating from 2.2.3 to 2.4.2, I get this exception when using SharpZipLib to extract

[ICSharpCode.SharpZipLib.Zip.ZipException: Size invalid for descriptor
  at ICSharpCode.SharpZipLib.Zip.ZipFile.TestLocalHeader(ZipEntry entry, HeaderTest tests)
  at ICSharpCode.SharpZipLib.Zip.ZipFile.LocateEntry(ZipEntry entry)
  at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream(Int64 entryIndex)
  at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream(ZipEntry entry)

I get a slightly different error when using 2.3.0: [ICSharpCode.SharpZipLib.Zip.ZipException: Extra data extended Zip64 information length is invalid

silverhammermba avatar Oct 08 '21 15:10 silverhammermba

Could be a bug in SharpZipLib. But to help here, someone made #640 in order to make zip64 optional instead of systematic.

Coeur avatar Sep 16 '24 18:09 Coeur

I changed zip64 logic to be "AUTO": it will only use zip64 when the size needs it.

Coeur avatar Nov 10 '24 13:11 Coeur