Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/QuantumDecoder.cpp')
-rw-r--r--[-rwxr-xr-x]CPP/7zip/Compress/QuantumDecoder.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/CPP/7zip/Compress/QuantumDecoder.cpp b/CPP/7zip/Compress/QuantumDecoder.cpp
index 63da32cc..b184dfb6 100755..100644
--- a/CPP/7zip/Compress/QuantumDecoder.cpp
+++ b/CPP/7zip/Compress/QuantumDecoder.cpp
@@ -70,7 +70,7 @@ HRESULT CDecoder::CodeSpec(UInt32 curSize)
{
lenSlot -= 2;
int numDirectBits = (int)(lenSlot >> 2);
- len += ((4 | (lenSlot & 3)) << numDirectBits) - 2;
+ len += ((4 | (lenSlot & 3)) << numDirectBits) - 2;
if (numDirectBits < 6)
len += _rangeDecoder.Stream.ReadBits(numDirectBits);
}
@@ -108,7 +108,9 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
return E_INVALIDARG;
UInt64 size = *outSize;
- SetInStream(inStream);
+ // SetInStream(inStream);
+ _rangeDecoder.SetStream(inStream);
+
_outWindowStream.SetStream(outStream);
SetOutStreamSize(outSize);
CDecoderFlusher flusher(this);
@@ -143,17 +145,20 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream
catch(...) { return S_FALSE; }
}
+/*
STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream)
{
+ m_InStreamRef = inStream;
_rangeDecoder.SetStream(inStream);
return S_OK;
}
STDMETHODIMP CDecoder::ReleaseInStream()
{
- _rangeDecoder.ReleaseStream();
+ m_InStreamRef.Release();
return S_OK;
}
+*/
STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize)
{