From: W. Felix Handte Date: Thu, 20 Apr 2023 15:46:29 +0000 (-0400) Subject: Tweak Ultra/Opt Guards X-Git-Tag: v1.5.6^2~162^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6761e1c949b99050f79a90a333c3432ba7cf3f22;p=thirdparty%2Fzstd.git Tweak Ultra/Opt Guards --- diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 4b0fbfafe..2856398cf 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -1350,21 +1350,26 @@ _shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ /* Return the last literals size */ return (size_t)(iend - anchor); } +#endif /* build exclusions */ +#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR static size_t ZSTD_compressBlock_opt0( ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) { return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); } +#endif +#if !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTULTRA2_BLOCK_COMPRESSOR) static size_t ZSTD_compressBlock_opt2( ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) { return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /* optLevel */, dictMode); } -#endif /* build exclusions */ +#endif #ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR size_t ZSTD_compressBlock_btopt( @@ -1379,8 +1384,7 @@ size_t ZSTD_compressBlock_btopt( -#if !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTULTRA2_BLOCK_COMPRESSOR) +#ifndef ZSTD_EXCLUDE_BTULTRA2_BLOCK_COMPRESSOR /* ZSTD_initStats_ultra(): * make a first compression pass, just to seed stats with more accurate starting values. * only works on first block, with no dictionary and no ldm.