Update to 7-Zip Version 21.02

This commit is contained in:
Tino Reichardt
2021-05-13 16:39:14 +02:00
parent 3724ecfedc
commit 48fa49f76c
620 changed files with 35032 additions and 10925 deletions

View File

@@ -38,7 +38,18 @@ public:
_value = 0;
}
UInt64 GetStreamSize() const { return _stream.GetStreamSize(); }
// the size of portion data in real stream that was already read from this object.
// it doesn't include unused data in BitStream object buffer (up to 4 bytes)
// it doesn't include unused data in TInByte buffers
// it doesn't include virtual Extra bytes after the end of real stream data
UInt64 GetStreamSize() const
{
return ExtraBitsWereRead() ?
_stream.GetStreamSize():
GetProcessedSize();
}
// the size of virtual data that was read from this object.
UInt64 GetProcessedSize() const { return _stream.GetProcessedSize() - ((kNumBigValueBits - _bitPos) >> 3); }
bool ThereAreDataInBitsBuffer() const { return this->_bitPos != kNumBigValueBits; }
@@ -139,6 +150,17 @@ public:
MovePos(8);
return b;
}
// call it only if the object is aligned for byte.
MY_FORCE_INLINE
bool ReadAlignedByte_FromBuf(Byte &b)
{
if (this->_bitPos == kNumBigValueBits)
return this->_stream.ReadByte_FromBuf(b);
b = (Byte)(_normalValue & 0xFF);
MovePos(8);
return true;
}
};
}