levels.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) Facebook, Inc.
  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. #ifndef LEVEL
  11. # error LEVEL(x) must be defined
  12. #endif
  13. #ifndef FAST_LEVEL
  14. # error FAST_LEVEL(x) must be defined
  15. #endif
  16. #ifndef ROW_LEVEL
  17. # error ROW_LEVEL(x, y) must be defined
  18. #endif
  19. /**
  20. * The levels are chosen to trigger every strategy in every source size,
  21. * as well as some fast levels and the default level.
  22. * If you change the compression levels, you should probably update these.
  23. */
  24. FAST_LEVEL(5)
  25. FAST_LEVEL(3)
  26. FAST_LEVEL(1)
  27. LEVEL(0)
  28. LEVEL(1)
  29. LEVEL(3)
  30. LEVEL(4)
  31. /* ROW_LEVEL triggers the row hash (force enabled and disabled) with different
  32. * dictionary strategies, and 16/32/64 row entries based on the level/searchLog.
  33. * 1 == enabled, 2 == disabled.
  34. */
  35. ROW_LEVEL(5, 1)
  36. ROW_LEVEL(5, 2) /* 16-entry rows */
  37. LEVEL(5)
  38. LEVEL(6)
  39. ROW_LEVEL(7, 1)
  40. ROW_LEVEL(7, 2) /* 16-entry rows */
  41. LEVEL(7)
  42. LEVEL(9)
  43. ROW_LEVEL(11, 1)
  44. ROW_LEVEL(11, 2) /* 32-entry rows */
  45. ROW_LEVEL(12, 1)
  46. ROW_LEVEL(12, 2) /* 64-entry rows */
  47. LEVEL(13)
  48. LEVEL(16)
  49. LEVEL(19)