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