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