Hello. We are using the current version of Aspose.ZIP for .NET (19.12). Running under .NET framework 4.7.2.
It works on many files but in some cases it fails with an IndexOutOfRangeException when calling the constructor.
Code as follows:
new Archive(@"C:\temp\testunzip\test.zip")
.ExtractToDirectory(@"C:\temp\testunzip\out");
Note that the failure is produced by the constructor; the call to “ExtractToDirectory” is never reached.
The ZIP file causing this issue is attached. I don’t believe that there is anything unusual about this ZIP. It is viewable and extractable by Windows Explorer.
test.zip (51.1 KB)
Error as follows:
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at .(Byte[] )
at .()
at .(BinaryReader )
at .(Int64 , UInt64 )
at Aspose.Zip.Archive.(Stream , ArchiveLoadOptions )
at Aspose.Zip.Archive..ctor(Stream sourceStream, ArchiveLoadOptions loadOptions, ArchiveEntrySettings newEntrySettings)
at Aspose.Zip.Archive..ctor(String path, ArchiveLoadOptions loadOptions, ArchiveEntrySettings newEntrySettings)