3 #ifndef __LZ_OUT_WINDOW_H
4 #define __LZ_OUT_WINDOW_H
6 #include "../../IStream.h"
7 #include "../../Common/OutBuffer.h"
10 typedef COutBufferException CLZOutWindowException;
13 class CLZOutWindow: public COutBuffer
16 void Init(bool solid = false);
18 // distance >= 0, len > 0,
19 bool CopyBlock(UInt32 distance, UInt32 len)
21 UInt32 pos = _pos - distance - 1;
24 if (!_overDict || distance >= _bufferSize)
28 if (_limitPos - _pos > len && _bufferSize - pos > len)
30 const Byte *src = _buffer + pos;
31 Byte *dest = _buffer + _pos;
39 if (pos == _bufferSize)
41 _buffer[_pos++] = _buffer[pos++];
42 if (_pos == _limitPos)
52 if (_pos == _limitPos)
56 Byte GetByte(UInt32 distance) const
58 UInt32 pos = _pos - distance - 1;
59 if (pos >= _bufferSize)