git subrepo pull (merge) --force deps/libchdr
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.6 / lib / compress / zstd_opt.h
CommitLineData
648db22b 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
18#include "zstd_compress_internal.h"
19
f535537f 20#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \
21 || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \
22 || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR)
648db22b 23/* used in ZSTD_loadDictionaryContent() */
24void ZSTD_updateTree(ZSTD_matchState_t* ms, const BYTE* ip, const BYTE* iend);
f535537f 25#endif
648db22b 26
f535537f 27#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
648db22b 28size_t ZSTD_compressBlock_btopt(
29 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
30 void const* src, size_t srcSize);
f535537f 31size_t ZSTD_compressBlock_btopt_dictMatchState(
648db22b 32 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
33 void const* src, size_t srcSize);
f535537f 34size_t ZSTD_compressBlock_btopt_extDict(
648db22b 35 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
36 void const* src, size_t srcSize);
37
f535537f 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
648db22b 46
f535537f 47#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
48size_t ZSTD_compressBlock_btultra(
648db22b 49 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
50 void const* src, size_t srcSize);
51size_t ZSTD_compressBlock_btultra_dictMatchState(
52 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
53 void const* src, size_t srcSize);
648db22b 54size_t ZSTD_compressBlock_btultra_extDict(
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) */
f535537f 61size_t ZSTD_compressBlock_btultra2(
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
648db22b 75
76#if defined (__cplusplus)
77}
78#endif
79
80#endif /* ZSTD_OPT_H */