Faulty signature detection when using custom SFX

Jan 7, 2013 at 7:10 AM

Hi,

In my application I use a custom SFX program which is prepended to the archive and all is fine, it can extract itself when double clicked, and the 7zip program can read the archive inside.

However that is not the case with the SevenZipSharp library. Given that my usage is exotic, I have written a function (in C++ using the LZMA SDK) which can give the offset of the signature inside the file.

The problem is that in FileSignatureChecker.cs, SevenZipSharp seeks to the beginning of the stream.

I think it should check the CanSeek property of the stream before doing so, that way I can seek the stream to the offset where the signature is but also it would make the SevenZipSharp extractor work with non-seekable streams (network streams etc...).

Best Regards,

Julien

Jan 7, 2013 at 9:39 AM

Actually, disabling seek didn't really help, and broke other parts of the library. So seek is actually imperative for SevenZipSharp to work.

Unfortunately that means it's not suited for my usage, so I dismissed it for a full C++ implementation based on the LZMA SDK.

Note that this is not the only library that fails to open my archive, I have tried with SharpCompress also and it didn't work either.

 

Best Regards,

Julien