You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zstd_lazy.h 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. #ifndef ZSTD_LAZY_H
  11. #define ZSTD_LAZY_H
  12. #if defined (__cplusplus)
  13. extern "C" {
  14. #endif
  15. #include "zstd_compress_internal.h"
  16. /**
  17. * Dedicated Dictionary Search Structure bucket log. In the
  18. * ZSTD_dedicatedDictSearch mode, the hashTable has
  19. * 2 ** ZSTD_LAZY_DDSS_BUCKET_LOG entries in each bucket, rather than just
  20. * one.
  21. */
  22. #define ZSTD_LAZY_DDSS_BUCKET_LOG 2
  23. #define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */
  24. U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip);
  25. void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);
  26. void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);
  27. void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */
  28. size_t ZSTD_compressBlock_btlazy2(
  29. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  30. void const* src, size_t srcSize);
  31. size_t ZSTD_compressBlock_lazy2(
  32. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  33. void const* src, size_t srcSize);
  34. size_t ZSTD_compressBlock_lazy(
  35. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  36. void const* src, size_t srcSize);
  37. size_t ZSTD_compressBlock_greedy(
  38. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  39. void const* src, size_t srcSize);
  40. size_t ZSTD_compressBlock_lazy2_row(
  41. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  42. void const* src, size_t srcSize);
  43. size_t ZSTD_compressBlock_lazy_row(
  44. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  45. void const* src, size_t srcSize);
  46. size_t ZSTD_compressBlock_greedy_row(
  47. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  48. void const* src, size_t srcSize);
  49. size_t ZSTD_compressBlock_btlazy2_dictMatchState(
  50. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  51. void const* src, size_t srcSize);
  52. size_t ZSTD_compressBlock_lazy2_dictMatchState(
  53. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  54. void const* src, size_t srcSize);
  55. size_t ZSTD_compressBlock_lazy_dictMatchState(
  56. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  57. void const* src, size_t srcSize);
  58. size_t ZSTD_compressBlock_greedy_dictMatchState(
  59. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  60. void const* src, size_t srcSize);
  61. size_t ZSTD_compressBlock_lazy2_dictMatchState_row(
  62. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  63. void const* src, size_t srcSize);
  64. size_t ZSTD_compressBlock_lazy_dictMatchState_row(
  65. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  66. void const* src, size_t srcSize);
  67. size_t ZSTD_compressBlock_greedy_dictMatchState_row(
  68. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  69. void const* src, size_t srcSize);
  70. size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
  71. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  72. void const* src, size_t srcSize);
  73. size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(
  74. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  75. void const* src, size_t srcSize);
  76. size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(
  77. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  78. void const* src, size_t srcSize);
  79. size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(
  80. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  81. void const* src, size_t srcSize);
  82. size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(
  83. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  84. void const* src, size_t srcSize);
  85. size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(
  86. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  87. void const* src, size_t srcSize);
  88. size_t ZSTD_compressBlock_greedy_extDict(
  89. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  90. void const* src, size_t srcSize);
  91. size_t ZSTD_compressBlock_lazy_extDict(
  92. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  93. void const* src, size_t srcSize);
  94. size_t ZSTD_compressBlock_lazy2_extDict(
  95. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  96. void const* src, size_t srcSize);
  97. size_t ZSTD_compressBlock_greedy_extDict_row(
  98. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  99. void const* src, size_t srcSize);
  100. size_t ZSTD_compressBlock_lazy_extDict_row(
  101. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  102. void const* src, size_t srcSize);
  103. size_t ZSTD_compressBlock_lazy2_extDict_row(
  104. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  105. void const* src, size_t srcSize);
  106. size_t ZSTD_compressBlock_btlazy2_extDict(
  107. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  108. void const* src, size_t srcSize);
  109. #if defined (__cplusplus)
  110. }
  111. #endif
  112. #endif /* ZSTD_LAZY_H */