mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 05:27:04 +00:00
weird file extension, but a 7Z archive #248
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @blandfbt on GitHub (Oct 20, 2017).
I'm working with your package, and I am trying to open an archive file with an XBK extension. If I use 7Zip, I can view the contents, extract it, etc. However, when I try to open it as an archive
using (var archive = SevenZipArchive.Open(filepath))I get the following stack trace errors. (removed a few of the ' so the code would stay in a block)
Unhandled Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object. at SharpCompress.Common.SevenZip.ArchiveReader.ReadDatabase(IPasswordProvider pass) at SharpCompress.Archives.SevenZip.SevenZipArchive.LoadFactory(Stream stream) at SharpCompress.Archives.SevenZip.SevenZipArchive.<LoadEntries>d__11.MoveNext() at SharpCompress.LazyReadOnlyCollection1.LazyLoader.MoveNext() at SharpCompress.Utility.ForEach[T](IEnumerable1 items, Action1 action) at SharpCompress.LazyReadOnlyCollection1.EnsureFullyLoaded() at SharpCompress.LazyReadOnlyCollection1.get_Count() at SharpCompress.Test.Streams.StreamTests.zipp(String zippath) at SharpCompress.Test.Streams.StreamTests.Main(String[] args)I tried to track down where this comes from, and I think it might be the header for the archive file. The first two lines of hex are are always of the form:
504b 0304 1403 0600 0800 0098 fd4a 0000 0000 0000 0000 0000 0000 1a00 0000 3230or
504b 0304 1403 0600 0800 0098 fb4a 0000 0000 0000 0000 0000 0000 1a00 0000 3230I tried to insert a new header (maybe naive of me), per the 7Zip recovery guide, but it doesn't help. I can still open it with 7Zip or PeaZip with the new header though.
377a bcaf 271c 0004 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000Any ideas where I could dig into this?
@adamhathcock commented on GitHub (Oct 23, 2017):
Sorry, it's been a while since I dove into the 7Zip archive format (which I hate.) I'm not sure how to help here with an obscure file format.