2 * Copyright (c) Meta Platforms, Inc. and affiliates.
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.
14 #if defined (__cplusplus)
18 #include "zstd_compress_internal.h"
21 * Dedicated Dictionary Search Structure bucket log. In the
22 * ZSTD_dedicatedDictSearch mode, the hashTable has
23 * 2 ** ZSTD_LAZY_DDSS_BUCKET_LOG entries in each bucket, rather than just
26 #define ZSTD_LAZY_DDSS_BUCKET_LOG 2
28 #define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */
30 U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip);
31 void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);
33 void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);
35 void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */
37 size_t ZSTD_compressBlock_btlazy2(
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(
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(
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(
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_lazy2_row(
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_lazy_row(
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_greedy_row(
56 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
57 void const* src, size_t srcSize);
59 size_t ZSTD_compressBlock_btlazy2_dictMatchState(
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_lazy2_dictMatchState(
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_lazy_dictMatchState(
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_greedy_dictMatchState(
69 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
70 void const* src, size_t srcSize);
71 size_t ZSTD_compressBlock_lazy2_dictMatchState_row(
72 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
73 void const* src, size_t srcSize);
74 size_t ZSTD_compressBlock_lazy_dictMatchState_row(
75 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
76 void const* src, size_t srcSize);
77 size_t ZSTD_compressBlock_greedy_dictMatchState_row(
78 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
79 void const* src, size_t srcSize);
81 size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
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_lazy_dedicatedDictSearch(
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_dedicatedDictSearch(
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_lazy2_dedicatedDictSearch_row(
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_lazy_dedicatedDictSearch_row(
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_dedicatedDictSearch_row(
97 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
98 void const* src, size_t srcSize);
100 size_t ZSTD_compressBlock_greedy_extDict(
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_lazy_extDict(
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_lazy2_extDict(
107 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
108 void const* src, size_t srcSize);
109 size_t ZSTD_compressBlock_greedy_extDict_row(
110 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
111 void const* src, size_t srcSize);
112 size_t ZSTD_compressBlock_lazy_extDict_row(
113 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
114 void const* src, size_t srcSize);
115 size_t ZSTD_compressBlock_lazy2_extDict_row(
116 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
117 void const* src, size_t srcSize);
118 size_t ZSTD_compressBlock_btlazy2_extDict(
119 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
120 void const* src, size_t srcSize);
123 #if defined (__cplusplus)
127 #endif /* ZSTD_LAZY_H */