sharpcompress icon indicating copy to clipboard operation
sharpcompress copied to clipboard

Failing to Read .7z Archive (LZMA:23)

Open Aragas opened this issue 1 year ago • 2 comments

I'm failing to extract this archive - "Sturgia is Norse for 1.0.2" via ArchiveFactory.Open https://www.nexusmods.com/mountandblade2bannerlord/mods/2713?tab=files Opening via 7z works, so the archive seems correct. Not sure what data I can give to help - the archive is SOLID with 1 block and the method is LZMA:23

SharpCompress.Compressors.LZMA.DataErrorException: Data Error
   at SharpCompress.Compressors.LZMA.LzmaStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at SharpCompress.Compressors.LZMA.Utilites.Utils.ReadExact(Stream stream, Byte[] buffer, Int32 offset, Int32 length)
   at SharpCompress.Common.SevenZip.ArchiveReader.ReadAndDecodePackedStreams(Int64 baseOffset, IPasswordProvider pass)
   at SharpCompress.Common.SevenZip.ArchiveReader.ReadDatabase(IPasswordProvider pass)
   at SharpCompress.Archives.SevenZip.SevenZipArchive.LoadFactory(Stream stream)
   at SharpCompress.Archives.SevenZip.SevenZipArchive.LoadEntries(IEnumerable`1 volumes)
   at SharpCompress.Archives.AbstractArchive`2..ctor(ArchiveType type, SourceStream srcStream)
   at SharpCompress.Archives.SevenZip.SevenZipArchive..ctor(SourceStream srcStream)
   at SharpCompress.Archives.SevenZip.SevenZipArchive.Open(FileInfo fileInfo, ReaderOptions readerOptions)
   at SharpCompress.Factories.SevenZipFactory.Open(FileInfo fileInfo, ReaderOptions readerOptions)
   at SharpCompress.Archives.ArchiveFactory.Open(FileInfo fileInfo, ReaderOptions options)
   at SharpCompress.Archives.ArchiveFactory.Open(String filePath, ReaderOptions options)
   at ...

Aragas avatar Oct 07 '23 06:10 Aragas

I guess this is an enhancement as this is a LZMA type not handled

adamhathcock avatar Oct 08 '23 08:10 adamhathcock

Have made some progress, this seems to be connected to LZMA EndOfStream marker, there are very small 7z files to test with that triggers the scenario. might take a look when I have the time.

Erior avatar Dec 07 '23 22:12 Erior