mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 06:11:32 -06:00
15.05
This commit is contained in:
committed by
Kornel Lesiński
parent
0713a3ab80
commit
54490d51d5
@@ -35,10 +35,13 @@ public:
|
||||
}
|
||||
else do
|
||||
{
|
||||
UInt32 pos2;
|
||||
if (pos == _bufSize)
|
||||
pos = 0;
|
||||
_buf[_pos++] = _buf[pos++];
|
||||
if (_pos == _limitPos)
|
||||
pos2 = _pos;
|
||||
_buf[pos2++] = _buf[pos++];
|
||||
_pos = pos2;
|
||||
if (pos2 == _limitPos)
|
||||
FlushWithCheck();
|
||||
}
|
||||
while (--len != 0);
|
||||
@@ -47,15 +50,17 @@ public:
|
||||
|
||||
void PutByte(Byte b)
|
||||
{
|
||||
_buf[_pos++] = b;
|
||||
if (_pos == _limitPos)
|
||||
UInt32 pos = _pos;
|
||||
_buf[pos++] = b;
|
||||
_pos = pos;
|
||||
if (pos == _limitPos)
|
||||
FlushWithCheck();
|
||||
}
|
||||
|
||||
Byte GetByte(UInt32 distance) const
|
||||
{
|
||||
UInt32 pos = _pos - distance - 1;
|
||||
if (pos >= _bufSize)
|
||||
if (distance >= _pos)
|
||||
pos += _bufSize;
|
||||
return _buf[pos];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user