1*3117ece4Schristos /* 2*3117ece4Schristos * Copyright (c) Meta Platforms, Inc. and affiliates. 3*3117ece4Schristos * All rights reserved. 4*3117ece4Schristos * 5*3117ece4Schristos * This source code is licensed under both the BSD-style license (found in the 6*3117ece4Schristos * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7*3117ece4Schristos * in the COPYING file in the root directory of this source tree). 8*3117ece4Schristos * You may select, at your option, one of the above-listed licenses. 9*3117ece4Schristos */ 10*3117ece4Schristos 11*3117ece4Schristos #ifndef ZSTD_DOUBLE_FAST_H 12*3117ece4Schristos #define ZSTD_DOUBLE_FAST_H 13*3117ece4Schristos 14*3117ece4Schristos #if defined (__cplusplus) 15*3117ece4Schristos extern "C" { 16*3117ece4Schristos #endif 17*3117ece4Schristos 18*3117ece4Schristos #include "../common/mem.h" /* U32 */ 19*3117ece4Schristos #include "zstd_compress_internal.h" /* ZSTD_CCtx, size_t */ 20*3117ece4Schristos 21*3117ece4Schristos #ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR 22*3117ece4Schristos 23*3117ece4Schristos void ZSTD_fillDoubleHashTable(ZSTD_matchState_t* ms, 24*3117ece4Schristos void const* end, ZSTD_dictTableLoadMethod_e dtlm, 25*3117ece4Schristos ZSTD_tableFillPurpose_e tfp); 26*3117ece4Schristos 27*3117ece4Schristos size_t ZSTD_compressBlock_doubleFast( 28*3117ece4Schristos ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 29*3117ece4Schristos void const* src, size_t srcSize); 30*3117ece4Schristos size_t ZSTD_compressBlock_doubleFast_dictMatchState( 31*3117ece4Schristos ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 32*3117ece4Schristos void const* src, size_t srcSize); 33*3117ece4Schristos size_t ZSTD_compressBlock_doubleFast_extDict( 34*3117ece4Schristos ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 35*3117ece4Schristos void const* src, size_t srcSize); 36*3117ece4Schristos 37*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST ZSTD_compressBlock_doubleFast 38*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE ZSTD_compressBlock_doubleFast_dictMatchState 39*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT ZSTD_compressBlock_doubleFast_extDict 40*3117ece4Schristos #else 41*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST NULL 42*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE NULL 43*3117ece4Schristos #define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT NULL 44*3117ece4Schristos #endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */ 45*3117ece4Schristos 46*3117ece4Schristos #if defined (__cplusplus) 47*3117ece4Schristos } 48*3117ece4Schristos #endif 49*3117ece4Schristos 50*3117ece4Schristos #endif /* ZSTD_DOUBLE_FAST_H */ 51