Path: blob/master/Utilities/cmzstd/lib/compress/zstd_lazy.h
3158 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_LAZY_H11#define ZSTD_LAZY_H1213#if defined (__cplusplus)14extern "C" {15#endif1617#include "zstd_compress_internal.h"1819/**20* Dedicated Dictionary Search Structure bucket log. In the21* ZSTD_dedicatedDictSearch mode, the hashTable has22* 2 ** ZSTD_LAZY_DDSS_BUCKET_LOG entries in each bucket, rather than just23* one.24*/25#define ZSTD_LAZY_DDSS_BUCKET_LOG 22627#define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */2829U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip);30void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);3132void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);3334void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */3536size_t ZSTD_compressBlock_btlazy2(37ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],38void const* src, size_t srcSize);39size_t ZSTD_compressBlock_lazy2(40ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],41void const* src, size_t srcSize);42size_t ZSTD_compressBlock_lazy(43ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],44void const* src, size_t srcSize);45size_t ZSTD_compressBlock_greedy(46ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],47void const* src, size_t srcSize);48size_t ZSTD_compressBlock_lazy2_row(49ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],50void const* src, size_t srcSize);51size_t ZSTD_compressBlock_lazy_row(52ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],53void const* src, size_t srcSize);54size_t ZSTD_compressBlock_greedy_row(55ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],56void const* src, size_t srcSize);5758size_t ZSTD_compressBlock_btlazy2_dictMatchState(59ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],60void const* src, size_t srcSize);61size_t ZSTD_compressBlock_lazy2_dictMatchState(62ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],63void const* src, size_t srcSize);64size_t ZSTD_compressBlock_lazy_dictMatchState(65ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],66void const* src, size_t srcSize);67size_t ZSTD_compressBlock_greedy_dictMatchState(68ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],69void const* src, size_t srcSize);70size_t ZSTD_compressBlock_lazy2_dictMatchState_row(71ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],72void const* src, size_t srcSize);73size_t ZSTD_compressBlock_lazy_dictMatchState_row(74ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],75void const* src, size_t srcSize);76size_t ZSTD_compressBlock_greedy_dictMatchState_row(77ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],78void const* src, size_t srcSize);7980size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(81ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],82void const* src, size_t srcSize);83size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(84ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],85void const* src, size_t srcSize);86size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(87ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],88void const* src, size_t srcSize);89size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(90ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],91void const* src, size_t srcSize);92size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(93ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],94void const* src, size_t srcSize);95size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(96ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],97void const* src, size_t srcSize);9899size_t ZSTD_compressBlock_greedy_extDict(100ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],101void const* src, size_t srcSize);102size_t ZSTD_compressBlock_lazy_extDict(103ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],104void const* src, size_t srcSize);105size_t ZSTD_compressBlock_lazy2_extDict(106ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],107void const* src, size_t srcSize);108size_t ZSTD_compressBlock_greedy_extDict_row(109ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],110void const* src, size_t srcSize);111size_t ZSTD_compressBlock_lazy_extDict_row(112ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],113void const* src, size_t srcSize);114size_t ZSTD_compressBlock_lazy2_extDict_row(115ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],116void const* src, size_t srcSize);117size_t ZSTD_compressBlock_btlazy2_extDict(118ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],119void const* src, size_t srcSize);120121122#if defined (__cplusplus)123}124#endif125126#endif /* ZSTD_LAZY_H */127128129