3 #ifndef __COMPRESS_LZX_H
\r
4 #define __COMPRESS_LZX_H
\r
6 namespace NCompress {
\r
9 const unsigned kNumHuffmanBits = 16;
\r
10 const UInt32 kNumRepDistances = 3;
\r
12 const UInt32 kNumLenSlots = 8;
\r
13 const UInt32 kMatchMinLen = 2;
\r
14 const UInt32 kNumLenSymbols = 249;
\r
15 const UInt32 kMatchMaxLen = kMatchMinLen + (kNumLenSlots - 1) + kNumLenSymbols - 1;
\r
17 const unsigned kNumAlignBits = 3;
\r
18 const UInt32 kAlignTableSize = 1 << kNumAlignBits;
\r
20 const UInt32 kNumPosSlots = 50;
\r
21 const UInt32 kNumPosLenSlots = kNumPosSlots * kNumLenSlots;
\r
23 const UInt32 kMainTableSize = 256 + kNumPosLenSlots;
\r
24 const UInt32 kLevelTableSize = 20;
\r
25 const UInt32 kMaxTableSize = kMainTableSize;
\r
27 const unsigned kNumBlockTypeBits = 3;
\r
28 const unsigned kBlockTypeVerbatim = 1;
\r
29 const unsigned kBlockTypeAligned = 2;
\r
30 const unsigned kBlockTypeUncompressed = 3;
\r
32 const unsigned kUncompressedBlockSizeNumBits = 24;
\r
34 const unsigned kNumBitsForPreTreeLevel = 4;
\r
36 const unsigned kLevelSymbolZeros = 17;
\r
37 const unsigned kLevelSymbolZerosBig = 18;
\r
38 const unsigned kLevelSymbolSame = 19;
\r
40 const unsigned kLevelSymbolZerosStartValue = 4;
\r
41 const unsigned kLevelSymbolZerosNumBits = 4;
\r
43 const unsigned kLevelSymbolZerosBigStartValue = kLevelSymbolZerosStartValue +
\r
44 (1 << kLevelSymbolZerosNumBits);
\r
45 const unsigned kLevelSymbolZerosBigNumBits = 5;
\r
47 const unsigned kLevelSymbolSameNumBits = 1;
\r
48 const unsigned kLevelSymbolSameStartValue = 4;
\r
50 const unsigned kNumBitsForAlignLevel = 3;
\r
52 const unsigned kNumDictionaryBitsMin = 15;
\r
53 const unsigned kNumDictionaryBitsMax = 21;
\r
54 const UInt32 kDictionarySizeMax = (1 << kNumDictionaryBitsMax);
\r
56 const unsigned kNumLinearPosSlotBits = 17;
\r
57 const UInt32 kNumPowerPosSlots = 0x26;
\r