2
0

zstd_lazy.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Copyright (c) Yann Collet, 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 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. U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip);
  24. void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);
  25. void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);
  26. void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */
  27. size_t ZSTD_compressBlock_btlazy2(
  28. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  29. void const* src, size_t srcSize);
  30. size_t ZSTD_compressBlock_lazy2(
  31. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  32. void const* src, size_t srcSize);
  33. size_t ZSTD_compressBlock_lazy(
  34. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  35. void const* src, size_t srcSize);
  36. size_t ZSTD_compressBlock_greedy(
  37. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  38. void const* src, size_t srcSize);
  39. size_t ZSTD_compressBlock_lazy2_row(
  40. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  41. void const* src, size_t srcSize);
  42. size_t ZSTD_compressBlock_lazy_row(
  43. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  44. void const* src, size_t srcSize);
  45. size_t ZSTD_compressBlock_greedy_row(
  46. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  47. void const* src, size_t srcSize);
  48. size_t ZSTD_compressBlock_btlazy2_dictMatchState(
  49. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  50. void const* src, size_t srcSize);
  51. size_t ZSTD_compressBlock_lazy2_dictMatchState(
  52. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  53. void const* src, size_t srcSize);
  54. size_t ZSTD_compressBlock_lazy_dictMatchState(
  55. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  56. void const* src, size_t srcSize);
  57. size_t ZSTD_compressBlock_greedy_dictMatchState(
  58. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  59. void const* src, size_t srcSize);
  60. size_t ZSTD_compressBlock_lazy2_dictMatchState_row(
  61. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  62. void const* src, size_t srcSize);
  63. size_t ZSTD_compressBlock_lazy_dictMatchState_row(
  64. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  65. void const* src, size_t srcSize);
  66. size_t ZSTD_compressBlock_greedy_dictMatchState_row(
  67. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  68. void const* src, size_t srcSize);
  69. size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
  70. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  71. void const* src, size_t srcSize);
  72. size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(
  73. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  74. void const* src, size_t srcSize);
  75. size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(
  76. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  77. void const* src, size_t srcSize);
  78. size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(
  79. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  80. void const* src, size_t srcSize);
  81. size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(
  82. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  83. void const* src, size_t srcSize);
  84. size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(
  85. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  86. void const* src, size_t srcSize);
  87. size_t ZSTD_compressBlock_greedy_extDict(
  88. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  89. void const* src, size_t srcSize);
  90. size_t ZSTD_compressBlock_lazy_extDict(
  91. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  92. void const* src, size_t srcSize);
  93. size_t ZSTD_compressBlock_lazy2_extDict(
  94. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  95. void const* src, size_t srcSize);
  96. size_t ZSTD_compressBlock_greedy_extDict_row(
  97. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  98. void const* src, size_t srcSize);
  99. size_t ZSTD_compressBlock_lazy_extDict_row(
  100. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  101. void const* src, size_t srcSize);
  102. size_t ZSTD_compressBlock_lazy2_extDict_row(
  103. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  104. void const* src, size_t srcSize);
  105. size_t ZSTD_compressBlock_btlazy2_extDict(
  106. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  107. void const* src, size_t srcSize);
  108. #if defined (__cplusplus)
  109. }
  110. #endif
  111. #endif /* ZSTD_LAZY_H */