Path: blob/main/sys/contrib/zstd/lib/compress/zstd_lazy.h
48378 views
/*1* Copyright (c) Yann Collet, Facebook, Inc.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 22627U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip);28void ZSTD_row_update(ZSTD_matchState_t* const ms, const BYTE* ip);2930void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const BYTE* const ip);3132void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */3334size_t ZSTD_compressBlock_btlazy2(35ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],36void const* src, size_t srcSize);37size_t ZSTD_compressBlock_lazy2(38ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],39void const* src, size_t srcSize);40size_t ZSTD_compressBlock_lazy(41ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],42void const* src, size_t srcSize);43size_t ZSTD_compressBlock_greedy(44ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],45void const* src, size_t srcSize);46size_t ZSTD_compressBlock_lazy2_row(47ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],48void const* src, size_t srcSize);49size_t ZSTD_compressBlock_lazy_row(50ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],51void const* src, size_t srcSize);52size_t ZSTD_compressBlock_greedy_row(53ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],54void const* src, size_t srcSize);5556size_t ZSTD_compressBlock_btlazy2_dictMatchState(57ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],58void const* src, size_t srcSize);59size_t ZSTD_compressBlock_lazy2_dictMatchState(60ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],61void const* src, size_t srcSize);62size_t ZSTD_compressBlock_lazy_dictMatchState(63ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],64void const* src, size_t srcSize);65size_t ZSTD_compressBlock_greedy_dictMatchState(66ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],67void const* src, size_t srcSize);68size_t ZSTD_compressBlock_lazy2_dictMatchState_row(69ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],70void const* src, size_t srcSize);71size_t ZSTD_compressBlock_lazy_dictMatchState_row(72ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],73void const* src, size_t srcSize);74size_t ZSTD_compressBlock_greedy_dictMatchState_row(75ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],76void const* src, size_t srcSize);7778size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(79ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],80void const* src, size_t srcSize);81size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(82ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],83void const* src, size_t srcSize);84size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(85ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],86void const* src, size_t srcSize);87size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(88ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],89void const* src, size_t srcSize);90size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(91ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],92void const* src, size_t srcSize);93size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(94ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],95void const* src, size_t srcSize);9697size_t ZSTD_compressBlock_greedy_extDict(98ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],99void const* src, size_t srcSize);100size_t ZSTD_compressBlock_lazy_extDict(101ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],102void const* src, size_t srcSize);103size_t ZSTD_compressBlock_lazy2_extDict(104ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],105void const* src, size_t srcSize);106size_t ZSTD_compressBlock_greedy_extDict_row(107ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],108void const* src, size_t srcSize);109size_t ZSTD_compressBlock_lazy_extDict_row(110ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],111void const* src, size_t srcSize);112size_t ZSTD_compressBlock_lazy2_extDict_row(113ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],114void const* src, size_t srcSize);115size_t ZSTD_compressBlock_btlazy2_extDict(116ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],117void const* src, size_t srcSize);118119120#if defined (__cplusplus)121}122#endif123124#endif /* ZSTD_LAZY_H */125126127