4 * Constants for the LZMS compression format.
7 #ifndef _LZMS_CONSTANTS_H
8 #define _LZMS_CONSTANTS_H
10 #define LZMS_MIN_MATCH_LEN 1
11 #define LZMS_MAX_MATCH_LEN 1073809578
12 #define LZMS_MAX_MATCH_OFFSET 1180427428
13 #define LZMS_MAX_BUFFER_SIZE (LZMS_MAX_MATCH_OFFSET + 1)
15 #define LZMS_NUM_RECENT_OFFSETS 3
16 #define LZMS_MAX_INIT_RECENT_OFFSET (LZMS_NUM_RECENT_OFFSETS + 1)
17 #define LZMS_OFFSET_OFFSET (LZMS_NUM_RECENT_OFFSETS - 1)
19 #define LZMS_PROBABILITY_BITS 6
20 #define LZMS_PROBABILITY_MAX (1U << LZMS_PROBABILITY_BITS)
21 #define LZMS_INITIAL_PROBABILITY 48
22 #define LZMS_INITIAL_RECENT_BITS 0x0000000055555555ULL
24 #define LZMS_NUM_MAIN_STATES 16
25 #define LZMS_NUM_MATCH_STATES 32
26 #define LZMS_NUM_LZ_MATCH_STATES 64
27 #define LZMS_NUM_LZ_REPEAT_MATCH_STATES 64
28 #define LZMS_NUM_DELTA_MATCH_STATES 64
29 #define LZMS_NUM_DELTA_REPEAT_MATCH_STATES 64
30 #define LZMS_MAX_NUM_STATES 64
32 #define LZMS_NUM_LITERAL_SYMS 256
33 #define LZMS_NUM_LENGTH_SYMS 54
34 #define LZMS_NUM_DELTA_POWER_SYMS 8
35 #define LZMS_MAX_NUM_OFFSET_SYMS 799
36 #define LZMS_MAX_NUM_SYMS 799
38 #define LZMS_MAX_CODEWORD_LEN 15
40 #define LZMS_LITERAL_CODE_REBUILD_FREQ 1024
41 #define LZMS_LZ_OFFSET_CODE_REBUILD_FREQ 1024
42 #define LZMS_LENGTH_CODE_REBUILD_FREQ 512
43 #define LZMS_DELTA_OFFSET_CODE_REBUILD_FREQ 1024
44 #define LZMS_DELTA_POWER_CODE_REBUILD_FREQ 512
46 #define LZMS_X86_ID_WINDOW_SIZE 65535
47 #define LZMS_X86_MAX_TRANSLATION_OFFSET 1023
49 #endif /* _LZMS_CONSTANTS_H */