9 const UInt32 kNumRepDistances
= 4;
11 const int kNumStates
= 12;
13 const Byte kLiteralNextStates
[kNumStates
] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
14 const Byte kMatchNextStates
[kNumStates
] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
15 const Byte kRepNextStates
[kNumStates
] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
16 const Byte kShortRepNextStates
[kNumStates
]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
22 void Init() { Index
= 0; }
23 void UpdateChar() { Index
= kLiteralNextStates
[Index
]; }
24 void UpdateMatch() { Index
= kMatchNextStates
[Index
]; }
25 void UpdateRep() { Index
= kRepNextStates
[Index
]; }
26 void UpdateShortRep() { Index
= kShortRepNextStates
[Index
]; }
27 bool IsCharState() const { return Index
< 7; }
30 const int kNumPosSlotBits
= 6;
31 const int kDicLogSizeMin
= 0;
32 const int kDicLogSizeMax
= 32;
33 const int kDistTableSizeMax
= kDicLogSizeMax
* 2;
35 const UInt32 kNumLenToPosStates
= 4;
37 inline UInt32
GetLenToPosState(UInt32 len
)
40 if (len
< kNumLenToPosStates
)
42 return kNumLenToPosStates
- 1;
47 const int kNumPosStatesBitsMax
= 4;
48 const UInt32 kNumPosStatesMax
= (1 << kNumPosStatesBitsMax
);
50 const int kNumPosStatesBitsEncodingMax
= 4;
51 const UInt32 kNumPosStatesEncodingMax
= (1 << kNumPosStatesBitsEncodingMax
);
53 const int kNumLowBits
= 3;
54 const int kNumMidBits
= 3;
55 const int kNumHighBits
= 8;
56 const UInt32 kNumLowSymbols
= 1 << kNumLowBits
;
57 const UInt32 kNumMidSymbols
= 1 << kNumMidBits
;
58 const UInt32 kNumSymbolsTotal
= kNumLowSymbols
+ kNumMidSymbols
+ (1 << kNumHighBits
);
62 const UInt32 kMatchMinLen
= 2;
63 const UInt32 kMatchMaxLen
= kMatchMinLen
+ NLength::kNumSymbolsTotal
- 1;
65 const int kNumAlignBits
= 4;
66 const UInt32 kAlignTableSize
= 1 << kNumAlignBits
;
67 const UInt32 kAlignMask
= (kAlignTableSize
- 1);
69 const UInt32 kStartPosModelIndex
= 4;
70 const UInt32 kEndPosModelIndex
= 14;
71 const UInt32 kNumPosModels
= kEndPosModelIndex
- kStartPosModelIndex
;
73 const UInt32 kNumFullDistances
= 1 << (kEndPosModelIndex
/ 2);
75 const int kNumLitPosStatesBitsEncodingMax
= 4;
76 const int kNumLitContextBitsMax
= 8;
78 const int kNumMoveBits
= 5;