Project Alice
Loading...
Searching...
No Matches
zstd_lazy.h
Go to the documentation of this file.
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
11#ifndef ZSTD_LAZY_H
12#define ZSTD_LAZY_H
13
14#if defined (__cplusplus)
15extern "C" {
16#endif
17
19
26#define ZSTD_LAZY_DDSS_BUCKET_LOG 2
27
28#define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */
29
30#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \
31 || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \
32 || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \
33 || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR)
35void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);
36
38
39void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue);
40#endif
41
42#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
44 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
45 void const* src, size_t srcSize);
47 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
48 void const* src, size_t srcSize);
50 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
51 void const* src, size_t srcSize);
53 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
54 void const* src, size_t srcSize);
56 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
57 void const* src, size_t srcSize);
59 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
60 void const* src, size_t srcSize);
62 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
63 void const* src, size_t srcSize);
65 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
66 void const* src, size_t srcSize);
67
68#define ZSTD_COMPRESSBLOCK_GREEDY ZSTD_compressBlock_greedy
69#define ZSTD_COMPRESSBLOCK_GREEDY_ROW ZSTD_compressBlock_greedy_row
70#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE ZSTD_compressBlock_greedy_dictMatchState
71#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW ZSTD_compressBlock_greedy_dictMatchState_row
72#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH ZSTD_compressBlock_greedy_dedicatedDictSearch
73#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_greedy_dedicatedDictSearch_row
74#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT ZSTD_compressBlock_greedy_extDict
75#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW ZSTD_compressBlock_greedy_extDict_row
76#else
77#define ZSTD_COMPRESSBLOCK_GREEDY NULL
78#define ZSTD_COMPRESSBLOCK_GREEDY_ROW NULL
79#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE NULL
80#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW NULL
81#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH NULL
82#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW NULL
83#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT NULL
84#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW NULL
85#endif
86
87#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
89 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
90 void const* src, size_t srcSize);
92 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
93 void const* src, size_t srcSize);
95 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
96 void const* src, size_t srcSize);
98 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
99 void const* src, size_t srcSize);
101 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
102 void const* src, size_t srcSize);
104 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
105 void const* src, size_t srcSize);
107 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
108 void const* src, size_t srcSize);
110 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
111 void const* src, size_t srcSize);
112
113#define ZSTD_COMPRESSBLOCK_LAZY ZSTD_compressBlock_lazy
114#define ZSTD_COMPRESSBLOCK_LAZY_ROW ZSTD_compressBlock_lazy_row
115#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE ZSTD_compressBlock_lazy_dictMatchState
116#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy_dictMatchState_row
117#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy_dedicatedDictSearch
118#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy_dedicatedDictSearch_row
119#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT ZSTD_compressBlock_lazy_extDict
120#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW ZSTD_compressBlock_lazy_extDict_row
121#else
122#define ZSTD_COMPRESSBLOCK_LAZY NULL
123#define ZSTD_COMPRESSBLOCK_LAZY_ROW NULL
124#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE NULL
125#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW NULL
126#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH NULL
127#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW NULL
128#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT NULL
129#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW NULL
130#endif
131
132#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
134 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
135 void const* src, size_t srcSize);
137 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
138 void const* src, size_t srcSize);
140 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
141 void const* src, size_t srcSize);
143 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
144 void const* src, size_t srcSize);
146 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
147 void const* src, size_t srcSize);
149 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
150 void const* src, size_t srcSize);
152 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
153 void const* src, size_t srcSize);
155 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
156 void const* src, size_t srcSize);
157
158#define ZSTD_COMPRESSBLOCK_LAZY2 ZSTD_compressBlock_lazy2
159#define ZSTD_COMPRESSBLOCK_LAZY2_ROW ZSTD_compressBlock_lazy2_row
160#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE ZSTD_compressBlock_lazy2_dictMatchState
161#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy2_dictMatchState_row
162#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy2_dedicatedDictSearch
163#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy2_dedicatedDictSearch_row
164#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT ZSTD_compressBlock_lazy2_extDict
165#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW ZSTD_compressBlock_lazy2_extDict_row
166#else
167#define ZSTD_COMPRESSBLOCK_LAZY2 NULL
168#define ZSTD_COMPRESSBLOCK_LAZY2_ROW NULL
169#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE NULL
170#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW NULL
171#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH NULL
172#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW NULL
173#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT NULL
174#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW NULL
175#endif
176
177#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
179 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
180 void const* src, size_t srcSize);
182 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
183 void const* src, size_t srcSize);
185 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
186 void const* src, size_t srcSize);
187
188#define ZSTD_COMPRESSBLOCK_BTLAZY2 ZSTD_compressBlock_btlazy2
189#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE ZSTD_compressBlock_btlazy2_dictMatchState
190#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT ZSTD_compressBlock_btlazy2_extDict
191#else
192#define ZSTD_COMPRESSBLOCK_BTLAZY2 NULL
193#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE NULL
194#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT NULL
195#endif
196
197
198#if defined (__cplusplus)
199}
200#endif
201
202#endif /* ZSTD_LAZY_H */
unsigned char BYTE
Definition: mem.h:58
unsigned int U32
Definition: mem.h:69
Definition: table.hpp:10
#define ZSTD_REP_NUM
Definition: zstd_internal.h:68
size_t ZSTD_compressBlock_btlazy2(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1916
void ZSTD_preserveUnsortedMark(U32 *const table, U32 const size, U32 const reducerValue)
size_t ZSTD_compressBlock_lazy_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2157
size_t ZSTD_compressBlock_greedy_extDict_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2148
size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1798
size_t ZSTD_compressBlock_lazy_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1835
size_t ZSTD_compressBlock_lazy_extDict_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2165
void ZSTD_row_update(ZSTD_matchState_t *const ms, const BYTE *ip)
Definition: zstd_lazy.c:949
size_t ZSTD_compressBlock_lazy_dictMatchState_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1856
size_t ZSTD_compressBlock_greedy_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1791
size_t ZSTD_compressBlock_greedy_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1805
size_t ZSTD_compressBlock_lazy2_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1879
void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t *ms, const BYTE *const ip)
Definition: zstd_lazy.c:411
size_t ZSTD_compressBlock_btlazy2_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2192
size_t ZSTD_compressBlock_greedy(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1784
size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1819
U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t *ms, const BYTE *ip)
Definition: zstd_lazy.c:659
size_t ZSTD_compressBlock_lazy2(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1872
size_t ZSTD_compressBlock_lazy2_dictMatchState_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1900
size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1842
size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1907
size_t ZSTD_compressBlock_lazy2_extDict_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2183
size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1863
size_t ZSTD_compressBlock_lazy2_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2175
size_t ZSTD_compressBlock_lazy(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1828
size_t ZSTD_compressBlock_greedy_dictMatchState_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1812
size_t ZSTD_compressBlock_lazy2_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1893
size_t ZSTD_compressBlock_greedy_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:2141
size_t ZSTD_compressBlock_lazy_row(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1849
size_t ZSTD_compressBlock_btlazy2_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1923
size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_lazy.c:1886