Project Alice
Loading...
Searching...
No Matches
zstd_opt.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_OPT_H
12#define ZSTD_OPT_H
13
14#if defined (__cplusplus)
15extern "C" {
16#endif
17
19
20#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \
21 || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \
22 || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR)
23/* used in ZSTD_loadDictionaryContent() */
24void ZSTD_updateTree(ZSTD_matchState_t* ms, const BYTE* ip, const BYTE* iend);
25#endif
26
27#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
29 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
30 void const* src, size_t srcSize);
32 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
33 void const* src, size_t srcSize);
35 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
36 void const* src, size_t srcSize);
37
38#define ZSTD_COMPRESSBLOCK_BTOPT ZSTD_compressBlock_btopt
39#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE ZSTD_compressBlock_btopt_dictMatchState
40#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT ZSTD_compressBlock_btopt_extDict
41#else
42#define ZSTD_COMPRESSBLOCK_BTOPT NULL
43#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE NULL
44#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT NULL
45#endif
46
47#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
49 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
50 void const* src, size_t srcSize);
52 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
53 void const* src, size_t srcSize);
55 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
56 void const* src, size_t srcSize);
57
58 /* note : no btultra2 variant for extDict nor dictMatchState,
59 * because btultra2 is not meant to work with dictionaries
60 * and is only specific for the first block (no prefix) */
62 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
63 void const* src, size_t srcSize);
64
65#define ZSTD_COMPRESSBLOCK_BTULTRA ZSTD_compressBlock_btultra
66#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE ZSTD_compressBlock_btultra_dictMatchState
67#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT ZSTD_compressBlock_btultra_extDict
68#define ZSTD_COMPRESSBLOCK_BTULTRA2 ZSTD_compressBlock_btultra2
69#else
70#define ZSTD_COMPRESSBLOCK_BTULTRA NULL
71#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE NULL
72#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT NULL
73#define ZSTD_COMPRESSBLOCK_BTULTRA2 NULL
74#endif
75
76#if defined (__cplusplus)
77}
78#endif
79
80#endif /* ZSTD_OPT_H */
unsigned char BYTE
Definition: mem.h:58
unsigned int U32
Definition: mem.h:69
#define ZSTD_REP_NUM
Definition: zstd_internal.h:68
size_t ZSTD_compressBlock_btultra(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1505
size_t ZSTD_compressBlock_btultra2(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1513
size_t ZSTD_compressBlock_btultra_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1566
size_t ZSTD_compressBlock_btultra_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1559
void ZSTD_updateTree(ZSTD_matchState_t *ms, const BYTE *ip, const BYTE *iend)
Definition: zstd_opt.c:583
size_t ZSTD_compressBlock_btopt_extDict(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1550
size_t ZSTD_compressBlock_btopt_dictMatchState(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1543
size_t ZSTD_compressBlock_btopt(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
Definition: zstd_opt.c:1460