]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Define Macros for Possibly-Present Functions; Use Them Rather than Ifdef Guards
authorW. Felix Handte <w@felixhandte.com>
Fri, 21 Apr 2023 15:32:41 +0000 (11:32 -0400)
committerW. Felix Handte <w@felixhandte.com>
Thu, 4 May 2023 16:18:58 +0000 (12:18 -0400)
lib/compress/zstd_compress.c
lib/compress/zstd_double_fast.h
lib/compress/zstd_lazy.h
lib/compress/zstd_opt.h

index c511519801e249ce0e1457d35f626598f0e8ec6b..541b776f1d186ff243cfa360a0c2769c7197695a 100644 (file)
@@ -3034,142 +3034,43 @@ ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_paramS
     static const ZSTD_blockCompressor blockCompressor[4][ZSTD_STRATEGY_MAX+1] = {
         { ZSTD_compressBlock_fast  /* default for 0 */,
           ZSTD_compressBlock_fast,
-#ifdef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_doubleFast,
-#endif
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_greedy,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy2,
-#endif
-#ifdef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btlazy2,
-#endif
-#ifdef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btopt,
-#endif
-#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
-          NULL,
-          NULL
-#else
-          ZSTD_compressBlock_btultra,
-          ZSTD_compressBlock_btultra2
-#endif
+          ZSTD_COMPRESSBLOCK_DOUBLEFAST,
+          ZSTD_COMPRESSBLOCK_GREEDY,
+          ZSTD_COMPRESSBLOCK_LAZY,
+          ZSTD_COMPRESSBLOCK_LAZY2,
+          ZSTD_COMPRESSBLOCK_BTLAZY2,
+          ZSTD_COMPRESSBLOCK_BTOPT,
+          ZSTD_COMPRESSBLOCK_BTULTRA,
+          ZSTD_COMPRESSBLOCK_BTULTRA2
         },
         { ZSTD_compressBlock_fast_extDict  /* default for 0 */,
           ZSTD_compressBlock_fast_extDict,
-#ifdef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_doubleFast_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_greedy_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy2_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btlazy2_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btopt_extDict,
-#endif
-#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
-          NULL,
-          NULL
-#else
-          ZSTD_compressBlock_btultra_extDict,
-          ZSTD_compressBlock_btultra_extDict
-#endif
+          ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT,
+          ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT,
+          ZSTD_COMPRESSBLOCK_LAZY_EXTDICT,
+          ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT,
+          ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT,
+          ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT,
+          ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT,
+          ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT
         },
         { ZSTD_compressBlock_fast_dictMatchState  /* default for 0 */,
           ZSTD_compressBlock_fast_dictMatchState,
-#ifdef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_doubleFast_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_greedy_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy2_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btlazy2_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_btopt_dictMatchState,
-#endif
-#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
-          NULL,
-          NULL
-#else
-          ZSTD_compressBlock_btultra_dictMatchState,
-          ZSTD_compressBlock_btultra_dictMatchState
-#endif
+          ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE,
+          ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE
         },
         { NULL  /* default for 0 */,
           NULL,
           NULL,
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_greedy_dedicatedDictSearch,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy_dedicatedDictSearch,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-          NULL,
-#else
-          ZSTD_compressBlock_lazy2_dedicatedDictSearch,
-#endif
+          ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH,
+          ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH,
+          ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH,
           NULL,
           NULL,
           NULL,
@@ -3183,72 +3084,24 @@ ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_paramS
     if (ZSTD_rowMatchFinderUsed(strat, useRowMatchFinder)) {
         static const ZSTD_blockCompressor rowBasedBlockCompressors[4][3] = {
             {
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_greedy_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy2_row
-#endif
+                ZSTD_COMPRESSBLOCK_GREEDY_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY2_ROW
             },
             {
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_greedy_extDict_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy_extDict_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy2_extDict_row
-#endif
+                ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW
             },
             {
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_greedy_dictMatchState_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy_dictMatchState_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy2_dictMatchState_row
-#endif
+                ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW
             },
             {
-#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_greedy_dedicatedDictSearch_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy_dedicatedDictSearch_row,
-#endif
-#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
-                NULL,
-#else
-                ZSTD_compressBlock_lazy2_dedicatedDictSearch_row
-#endif
+                ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW,
+                ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW
             }
         };
         DEBUGLOG(4, "Selecting a row-based matchfinder");
index f1a86d5c489ca2d9570a31bc6b625d674d117247..ce6ed8c97fd7913714a8cc3d172f652b5f2d80e3 100644 (file)
@@ -23,6 +23,7 @@ extern "C" {
 void ZSTD_fillDoubleHashTable(ZSTD_matchState_t* ms,
                               void const* end, ZSTD_dictTableLoadMethod_e dtlm,
                               ZSTD_tableFillPurpose_e tfp);
+
 size_t ZSTD_compressBlock_doubleFast(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
@@ -33,6 +34,13 @@ size_t ZSTD_compressBlock_doubleFast_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
 
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST ZSTD_compressBlock_doubleFast
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE ZSTD_compressBlock_doubleFast_dictMatchState
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT ZSTD_compressBlock_doubleFast_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST NULL
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE NULL
+#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT NULL
 #endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */
 
 #if defined (__cplusplus)
index 7e11d0cf1265ed594ae88f8a3558a109e00fb938..da320030f02b3f5696dea70b237f4d3f526eba64 100644 (file)
@@ -43,139 +43,220 @@ void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const redu
 size_t ZSTD_compressBlock_btlazy2(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTLAZY2 ZSTD_compressBlock_btlazy2
+#else
+#define ZSTD_COMPRESSBLOCK_BTLAZY2 NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2 ZSTD_compressBlock_lazy2
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2 NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY ZSTD_compressBlock_lazy
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY ZSTD_compressBlock_greedy
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_ROW ZSTD_compressBlock_lazy2_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_ROW ZSTD_compressBlock_lazy_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_ROW ZSTD_compressBlock_greedy_row
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_ROW NULL
 #endif
 
 #ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btlazy2_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE ZSTD_compressBlock_btlazy2_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE ZSTD_compressBlock_lazy2_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE ZSTD_compressBlock_lazy_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE ZSTD_compressBlock_greedy_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_dictMatchState_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy2_dictMatchState_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_dictMatchState_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy_dictMatchState_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_dictMatchState_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW ZSTD_compressBlock_greedy_dictMatchState_row
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW NULL
 #endif
 
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy2_dedicatedDictSearch
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy_dedicatedDictSearch
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH ZSTD_compressBlock_greedy_dedicatedDictSearch
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy2_dedicatedDictSearch_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy_dedicatedDictSearch_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_greedy_dedicatedDictSearch_row
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW NULL
 #endif
 
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT ZSTD_compressBlock_greedy_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT ZSTD_compressBlock_lazy_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT ZSTD_compressBlock_lazy2_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT NULL
 #endif
 #ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_greedy_extDict_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW ZSTD_compressBlock_greedy_extDict_row
+#else
+#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy_extDict_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW ZSTD_compressBlock_lazy_extDict_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_lazy2_extDict_row(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW ZSTD_compressBlock_lazy2_extDict_row
+#else
+#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW NULL
 #endif
 #ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btlazy2_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT ZSTD_compressBlock_btlazy2_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT NULL
 #endif
 
 
index e503df32b94cd5f65f2b37801d334e19e2c23587..694e317657d720e5d8f4082d8e6fb5fd38e3fabf 100644 (file)
@@ -28,14 +28,23 @@ void ZSTD_updateTree(ZSTD_matchState_t* ms, const BYTE* ip, const BYTE* iend);
 size_t ZSTD_compressBlock_btopt(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTOPT ZSTD_compressBlock_btopt
+#else
+#define ZSTD_COMPRESSBLOCK_BTOPT NULL
 #endif
+
 #ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btultra(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTULTRA ZSTD_compressBlock_btultra
 size_t ZSTD_compressBlock_btultra2(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTULTRA2 ZSTD_compressBlock_btultra2
+#else
+#define ZSTD_COMPRESSBLOCK_BTULTRA NULL
+#define ZSTD_COMPRESSBLOCK_BTULTRA2 NULL
 #endif
 
 
@@ -43,22 +52,34 @@ size_t ZSTD_compressBlock_btultra2(
 size_t ZSTD_compressBlock_btopt_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE ZSTD_compressBlock_btopt_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE NULL
 #endif
 #ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btultra_dictMatchState(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE ZSTD_compressBlock_btultra_dictMatchState
+#else
+#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE NULL
 #endif
 
 #ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btopt_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT ZSTD_compressBlock_btopt_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT NULL
 #endif
 #ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR
 size_t ZSTD_compressBlock_btultra_extDict(
         ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
         void const* src, size_t srcSize);
+#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT ZSTD_compressBlock_btultra_extDict
+#else
+#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT NULL
 #endif
 
         /* note : no btultra2 variant for extDict nor dictMatchState,