Does LZMA SDK has API for extracting 7z-archive from memory?
Are there any examples to demonstrate such functionality? I've quickly examined \CPP\7zip\Bundles, but couldn't find relevant samples.
Typical usage scenario: downloading an archive from Internet, while keeping it in memory, and extracting it to disk (or preferably to memory as well) when the download is complete.
According to the hints in the related discussion Extract to memory , the interface IArchiveExtractCallback may partially help with this task. I guess, its method GetStream is called to request 'output stream' for writing extracted content.
The only sample which overrides this method is CPP\7zip\Bundles\SFXSetup (I'm referring to CExtractCallbackImp::GetStream).
So probably extracting to memory can be handled this way.
And what about extracting from memory?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does LZMA SDK has API for extracting 7z-archive from memory?
Are there any examples to demonstrate such functionality? I've quickly examined
\CPP\7zip\Bundles
, but couldn't find relevant samples.Typical usage scenario: downloading an archive from Internet, while keeping it in memory, and extracting it to disk (or preferably to memory as well) when the download is complete.
According to the hints in the related discussion Extract to memory , the interface
IArchiveExtractCallback
may partially help with this task. I guess, its methodGetStream
is called to request 'output stream' for writing extracted content.The only sample which overrides this method is
CPP\7zip\Bundles\SFXSetup
(I'm referring toCExtractCallbackImp::GetStream
).So probably extracting to memory can be handled this way.
And what about extracting from memory?
When you open archive you send
IInStream
object.IInStream
object can be created withCReferenceBuf
fromStreamObjects.h
.Last edit: Igor Pavlov 2022-12-14