3 #include "../LZInWindow.h"
4 #include "../IMatchFinder.h"
6 namespace HC_NAMESPACE
{
9 const UInt32 kMaxValForNormalize
= (UInt32(1) << 31) - 1;
13 public IMatchFinderSetCallback
,
17 UInt32 _cyclicBufferPos
;
18 UInt32 _cyclicBufferSize
; // it must be historySize + 1
23 CMyComPtr
<IMatchFinderCallback
> m_Callback
;
26 void FreeThisClassMemory();
29 MY_UNKNOWN_IMP1(IMatchFinderSetCallback
)
31 STDMETHOD(Init
)(ISequentialInStream
*inStream
);
32 STDMETHOD_(void, ReleaseStream
)();
34 STDMETHOD_(Byte
, GetIndexByte
)(Int32 index
);
35 STDMETHOD_(UInt32
, GetMatchLen
)(Int32 index
, UInt32 back
, UInt32 limit
);
36 STDMETHOD_(UInt32
, GetNumAvailableBytes
)();
37 STDMETHOD_(const Byte
*, GetPointerToCurrentPos
)();
38 STDMETHOD(Create
)(UInt32 historySize
, UInt32 keepAddBufferBefore
,
39 UInt32 matchMaxLen
, UInt32 keepAddBufferAfter
);
40 STDMETHOD_(UInt32
, GetLongestMatch
)(UInt32
*distances
);
41 STDMETHOD_(void, DummyLongestMatch
)();
43 // IMatchFinderSetCallback
44 STDMETHOD(SetCallback
)(IMatchFinderCallback
*callback
);
46 virtual void BeforeMoveBlock();
47 virtual void AfterMoveBlock();
51 virtual ~CMatchFinderHC();
52 void SetCutValue(UInt32 cutValue
) { _cutValue
= cutValue
; }