3 #include "../LZInWindow.h"
\r
4 #include "../IMatchFinder.h"
\r
6 namespace BT_NAMESPACE {
\r
8 typedef UInt32 CIndex;
\r
9 const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1;
\r
11 class CMatchFinder:
\r
12 public IMatchFinder,
\r
14 public CMyUnknownImp,
\r
15 public IMatchFinderSetNumPasses
\r
17 UInt32 _cyclicBufferPos;
\r
18 UInt32 _cyclicBufferSize; // it must be historySize + 1
\r
19 UInt32 _matchMaxLen;
\r
24 UInt32 _hashSizeSum;
\r
27 void FreeThisClassMemory();
\r
32 STDMETHOD(SetStream)(ISequentialInStream *inStream);
\r
33 STDMETHOD_(void, ReleaseStream)();
\r
36 STDMETHOD_(Byte, GetIndexByte)(Int32 index);
\r
37 STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
\r
38 STDMETHOD_(UInt32, GetNumAvailableBytes)();
\r
39 STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
\r
40 STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes);
\r
41 STDMETHOD_(void, ChangeBufferPos)();
\r
43 STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
\r
44 UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
\r
45 STDMETHOD(GetMatches)(UInt32 *distances);
\r
46 STDMETHOD(Skip)(UInt32 num);
\r
50 virtual ~CMatchFinder();
\r
51 virtual void SetNumPasses(UInt32 numPasses) { _cutValue = numPasses; }
\r