648db22b |
1 | /* |
2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
3 | * All rights reserved. |
4 | * |
5 | * This source code is licensed under both the BSD-style license (found in the |
6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found |
7 | * in the COPYING file in the root directory of this source tree). |
8 | * You may select, at your option, one of the above-listed licenses. |
9 | */ |
10 | |
11 | #ifndef LEVEL |
12 | # error LEVEL(x) must be defined |
13 | #endif |
14 | #ifndef FAST_LEVEL |
15 | # error FAST_LEVEL(x) must be defined |
16 | #endif |
17 | #ifndef ROW_LEVEL |
18 | # error ROW_LEVEL(x, y) must be defined |
19 | #endif |
20 | |
21 | /** |
22 | * The levels are chosen to trigger every strategy in every source size, |
23 | * as well as some fast levels and the default level. |
24 | * If you change the compression levels, you should probably update these. |
25 | */ |
26 | |
27 | FAST_LEVEL(5) |
28 | |
29 | FAST_LEVEL(3) |
30 | |
31 | FAST_LEVEL(1) |
32 | LEVEL(0) |
33 | LEVEL(1) |
34 | |
35 | LEVEL(3) |
36 | LEVEL(4) |
37 | /* ROW_LEVEL triggers the row hash (force enabled and disabled) with different |
38 | * dictionary strategies, and 16/32/64 row entries based on the level/searchLog. |
39 | * 1 == enabled, 2 == disabled. |
40 | */ |
41 | ROW_LEVEL(5, 1) |
42 | ROW_LEVEL(5, 2) /* 16-entry rows */ |
43 | LEVEL(5) |
44 | LEVEL(6) |
45 | ROW_LEVEL(7, 1) |
46 | ROW_LEVEL(7, 2) /* 16-entry rows */ |
47 | LEVEL(7) |
48 | |
49 | LEVEL(9) |
50 | |
51 | ROW_LEVEL(11, 1) |
52 | ROW_LEVEL(11, 2) /* 32-entry rows */ |
53 | ROW_LEVEL(12, 1) |
54 | ROW_LEVEL(12, 2) /* 64-entry rows */ |
55 | LEVEL(13) |
56 | |
57 | LEVEL(16) |
58 | |
59 | LEVEL(19) |