zstd_lazy.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (c) 2016-2020, 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_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);
  25. void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */
  26. size_t ZSTD_compressBlock_btlazy2(
  27. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  28. void const* src, size_t srcSize);
  29. size_t ZSTD_compressBlock_lazy2(
  30. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  31. void const* src, size_t srcSize);
  32. size_t ZSTD_compressBlock_lazy(
  33. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  34. void const* src, size_t srcSize);
  35. size_t ZSTD_compressBlock_greedy(
  36. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  37. void const* src, size_t srcSize);
  38. size_t ZSTD_compressBlock_btlazy2_dictMatchState(
  39. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  40. void const* src, size_t srcSize);
  41. size_t ZSTD_compressBlock_lazy2_dictMatchState(
  42. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  43. void const* src, size_t srcSize);
  44. size_t ZSTD_compressBlock_lazy_dictMatchState(
  45. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  46. void const* src, size_t srcSize);
  47. size_t ZSTD_compressBlock_greedy_dictMatchState(
  48. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  49. void const* src, size_t srcSize);
  50. size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
  51. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  52. void const* src, size_t srcSize);
  53. size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(
  54. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  55. void const* src, size_t srcSize);
  56. size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(
  57. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  58. void const* src, size_t srcSize);
  59. size_t ZSTD_compressBlock_greedy_extDict(
  60. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  61. void const* src, size_t srcSize);
  62. size_t ZSTD_compressBlock_lazy_extDict(
  63. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  64. void const* src, size_t srcSize);
  65. size_t ZSTD_compressBlock_lazy2_extDict(
  66. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  67. void const* src, size_t srcSize);
  68. size_t ZSTD_compressBlock_btlazy2_extDict(
  69. ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
  70. void const* src, size_t srcSize);
  71. #if defined (__cplusplus)
  72. }
  73. #endif
  74. #endif /* ZSTD_LAZY_H */