I want to implement custom unpacker for multivolume 7z archive (as part of plugin). I can't unpack files in memory, so I should use low-level function LzmaDec_DecodeToBuf. Which steps are required for that?
Currently I'm trying to fill CSzArEx structure. I can't do this because SzArEx_Open2 wants to seek at the end of archive, but I don't know yet where is the end of the multivolume archive and I even don't know how many parts in the archive. Whether it is possible to get this information?
I'm using C version of the library. The C++ version is too complex, I don't want use it.
There is link to footer in header (first 32 bytes).
Is the LzmaDec_DecodeToBuf method suitable for decoding all standard 7z archives? Or is it method just for lzma? As I understand, archive may be packed with the lzma, lzma2, bcj2 codecs.
Use 7zDec.c to decode .7z archives.
7zDec unpack files in memory, am I right? If archive contain very large files, say more than a gigabyte, there is a problem that file can't fit in memory.
So, I concluded that a most simple way to unpack 7z archives is to use 7z.dll library.
Yes, 7zDec unpacks to memory.
I have plans to write another C code that will unpacks to file. But now I don't know when it will be implemented.
Is it safe to assume, that IInStream::Seek(…, STREAM_SEEK_END, …) will never be called?
When working with multipart archives I do not know in advance the full size of the archive, so I can't implement STREAM_SEEK_END right.
When STREAM_SEEK_SET and STREAM_SEEK_CUR are used I can incrementally open new parts as needed, and it's safe.