1 /* LzHash.h -- HASH constants for LZ algorithms
2 2023-03-05 : Igor Pavlov : Public domain */
4 #ifndef ZIP7_INC_LZ_HASH_H
5 #define ZIP7_INC_LZ_HASH_H
8 (kHash2Size >= (1 << 8)) : Required
9 (kHash3Size >= (1 << 16)) : Required
12 #define kHash2Size (1 << 10)
13 #define kHash3Size (1 << 16)
14 // #define kHash4Size (1 << 20)
16 #define kFix3HashSize (kHash2Size)
17 #define kFix4HashSize (kHash2Size + kHash3Size)
18 // #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
21 We use up to 3 crc values for hash:
25 (Shift_1 = 5) and (Shift_2 = 10) is good tradeoff.
26 Small values for Shift are not good for collision rate.
27 Big value for Shift_2 increases the minimum size
28 of hash table, that will be slow for small files.
31 #define kLzHash_CrcShift_1 5
32 #define kLzHash_CrcShift_2 10