Update to 7-Zip Version 21.03

This commit is contained in:
Tino Reichardt
2021-08-25 22:33:02 +02:00
parent 27d965fd99
commit df06f31a42
90 changed files with 6003 additions and 1882 deletions

View File

@@ -274,15 +274,24 @@ HRESULT CCoder::CodeSpec(UInt32 curSize, bool finishInputStream, UInt32 inputPro
sym = m_DistDecoder.Decode(&m_InBitStream);
if (sym >= _numDistLevels)
return S_FALSE;
UInt32 distance = kDistStart[sym] + m_InBitStream.ReadBits(kDistDirectBits[sym]);
if (!m_OutWindowStream.CopyBlock(distance, locLen))
sym = kDistStart[sym] + m_InBitStream.ReadBits(kDistDirectBits[sym]);
/*
if (sym >= 4)
{
// sym &= 31;
const unsigned numDirectBits = (unsigned)(((sym >> 1) - 1));
sym = (2 | (sym & 1)) << numDirectBits;
sym += m_InBitStream.ReadBits(numDirectBits);
}
*/
if (!m_OutWindowStream.CopyBlock(sym, locLen))
return S_FALSE;
curSize -= locLen;
len -= locLen;
if (len != 0)
{
_remainLen = (Int32)len;
_rep0 = distance;
_rep0 = sym;
break;
}
}