Path: blob/master/Utilities/cmzstd/lib/compress/zstd_opt.h
5024 views
/*1* Copyright (c) Meta Platforms, Inc. and affiliates.2* All rights reserved.3*4* This source code is licensed under both the BSD-style license (found in the5* LICENSE file in the root directory of this source tree) and the GPLv2 (found6* in the COPYING file in the root directory of this source tree).7* You may select, at your option, one of the above-listed licenses.8*/910#ifndef ZSTD_OPT_H11#define ZSTD_OPT_H1213#include "zstd_compress_internal.h"1415#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \16|| !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \17|| !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR)18/* used in ZSTD_loadDictionaryContent() */19void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend);20#endif2122#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR23size_t ZSTD_compressBlock_btopt(24ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],25void const* src, size_t srcSize);26size_t ZSTD_compressBlock_btopt_dictMatchState(27ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],28void const* src, size_t srcSize);29size_t ZSTD_compressBlock_btopt_extDict(30ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],31void const* src, size_t srcSize);3233#define ZSTD_COMPRESSBLOCK_BTOPT ZSTD_compressBlock_btopt34#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE ZSTD_compressBlock_btopt_dictMatchState35#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT ZSTD_compressBlock_btopt_extDict36#else37#define ZSTD_COMPRESSBLOCK_BTOPT NULL38#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE NULL39#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT NULL40#endif4142#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR43size_t ZSTD_compressBlock_btultra(44ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],45void const* src, size_t srcSize);46size_t ZSTD_compressBlock_btultra_dictMatchState(47ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],48void const* src, size_t srcSize);49size_t ZSTD_compressBlock_btultra_extDict(50ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],51void const* src, size_t srcSize);5253/* note : no btultra2 variant for extDict nor dictMatchState,54* because btultra2 is not meant to work with dictionaries55* and is only specific for the first block (no prefix) */56size_t ZSTD_compressBlock_btultra2(57ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],58void const* src, size_t srcSize);5960#define ZSTD_COMPRESSBLOCK_BTULTRA ZSTD_compressBlock_btultra61#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE ZSTD_compressBlock_btultra_dictMatchState62#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT ZSTD_compressBlock_btultra_extDict63#define ZSTD_COMPRESSBLOCK_BTULTRA2 ZSTD_compressBlock_btultra264#else65#define ZSTD_COMPRESSBLOCK_BTULTRA NULL66#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE NULL67#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT NULL68#define ZSTD_COMPRESSBLOCK_BTULTRA2 NULL69#endif7071#endif /* ZSTD_OPT_H */727374