Hello. I made an archive with 7zip. It is password protected, also headers are protected with -mhe switch.
I want to decompress it into memory. Used Client7z (CPP\7zip\UI\Client7z) as an example. It works fine, but in this example I found out how to extract into some folder, but I need extract forward into memory, without extracting it first into a disk space.
Help please.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use CBufPtrSeqOutStream object instead of COutFileStream.
Change the code:
_outFileStreamSpec = new COutFileStream;
CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
if (!_outFileStreamSpec->Open(fullProcessedPath, CREATE_ALWAYS))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not really good at 7z sources.
I found some code that uses CBufPtrSeqOutStream, and its Init method requires(as I understand) the size of unpacked data.
Could you please give an exact explanation on how to use CBufPtrSeqOutStream ?
I have no folders inside my archieve, only files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can request uncompressed size of any file in archive with the following code:
// Get uncompressed size of file
NCOM::CPropVariant prop;
archive->GetProperty(i, kpidSize, &prop);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello. I made an archive with 7zip. It is password protected, also headers are protected with -mhe switch.
I want to decompress it into memory. Used Client7z (CPP\7zip\UI\Client7z) as an example. It works fine, but in this example I found out how to extract into some folder, but I need extract forward into memory, without extracting it first into a disk space.
Help please.
Use CBufPtrSeqOutStream object instead of COutFileStream.
Change the code:
_outFileStreamSpec = new COutFileStream;
CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
if (!_outFileStreamSpec->Open(fullProcessedPath, CREATE_ALWAYS))
I'm not really good at 7z sources.
I found some code that uses CBufPtrSeqOutStream, and its Init method requires(as I understand) the size of unpacked data.
Could you please give an exact explanation on how to use CBufPtrSeqOutStream ?
I have no folders inside my archieve, only files.
You can request uncompressed size of any file in archive with the following code:
// Get uncompressed size of file
NCOM::CPropVariant prop;
archive->GetProperty(i, kpidSize, &prop);