mirror of
https://github.com/Xevion/easy7zip.git
synced 2026-01-31 12:24:08 -06:00
15.05
This commit is contained in:
committed by
Kornel Lesiński
parent
0713a3ab80
commit
54490d51d5
@@ -25,20 +25,16 @@ namespace NCompress {
|
||||
namespace NLzma {
|
||||
|
||||
CDecoder::CDecoder(): _inBuf(0), _propsWereSet(false), _outSizeDefined(false),
|
||||
_inBufSize(1 << 20),
|
||||
_outBufSize(1 << 22),
|
||||
FinishStream(false),
|
||||
NeedMoreInput(false)
|
||||
_inBufSize(1 << 20),
|
||||
_outBufSize(1 << 22),
|
||||
FinishStream(false),
|
||||
NeedMoreInput(false)
|
||||
{
|
||||
_inSizeProcessed = 0;
|
||||
_inPos = _inSize = 0;
|
||||
LzmaDec_Construct(&_state);
|
||||
}
|
||||
|
||||
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
|
||||
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
|
||||
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
||||
|
||||
CDecoder::~CDecoder()
|
||||
{
|
||||
LzmaDec_Free(&_state, &g_Alloc);
|
||||
@@ -87,6 +83,12 @@ STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CDecoder::SetFinishMode(UInt32 finishMode)
|
||||
{
|
||||
FinishStream = (finishMode != 0);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDecoder::CodeSpec(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress)
|
||||
{
|
||||
if (_inBuf == 0 || !_propsWereSet)
|
||||
|
||||
Reference in New Issue
Block a user