Run dos2unix on bayou and remove white space at the end of lines.
[coreboot.git] / payloads / bayou / util / pbuilder / lzma / C / 7zip / Compress / LZ / BinTree / BinTree.h
1 // BinTree.h
2
3 #include "../LZInWindow.h"
4 #include "../IMatchFinder.h"
5
6 namespace BT_NAMESPACE {
7
8 typedef UInt32 CIndex;
9 const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1;
10
11 class CMatchFinder:
12   public IMatchFinder,
13   public CLZInWindow,
14   public CMyUnknownImp,
15   public IMatchFinderSetNumPasses
16 {
17   UInt32 _cyclicBufferPos;
18   UInt32 _cyclicBufferSize; // it must be historySize + 1
19   UInt32 _matchMaxLen;
20   CIndex *_hash;
21   CIndex *_son;
22   UInt32 _hashMask;
23   UInt32 _cutValue;
24   UInt32 _hashSizeSum;
25
26   void Normalize();
27   void FreeThisClassMemory();
28   void FreeMemory();
29
30   MY_UNKNOWN_IMP
31
32   STDMETHOD(SetStream)(ISequentialInStream *inStream);
33   STDMETHOD_(void, ReleaseStream)();
34   STDMETHOD(Init)();
35   HRESULT MovePos();
36   STDMETHOD_(Byte, GetIndexByte)(Int32 index);
37   STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
38   STDMETHOD_(UInt32, GetNumAvailableBytes)();
39   STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
40   STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes);
41   STDMETHOD_(void, ChangeBufferPos)();
42
43   STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
44       UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
45   STDMETHOD(GetMatches)(UInt32 *distances);
46   STDMETHOD(Skip)(UInt32 num);
47
48 public:
49   CMatchFinder();
50   virtual ~CMatchFinder();
51   virtual void SetNumPasses(UInt32 numPasses) { _cutValue = numPasses; }
52 };
53
54 }