]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Tweak Ultra/Opt Guards
authorW. Felix Handte <w@felixhandte.com>
Thu, 20 Apr 2023 15:46:29 +0000 (11:46 -0400)
committerW. Felix Handte <w@felixhandte.com>
Thu, 4 May 2023 16:18:58 +0000 (12:18 -0400)
lib/compress/zstd_opt.c

index 4b0fbfafe0afb17ab95bdbcf9d3a52b87eb1cfe6..2856398cf8abf6d0562606f9c18da28c9797da79 100644 (file)
@@ -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.