bounds.upperBound = (int)ZSTD_ps_disable;
return bounds;
+ case ZSTD_c_blockSplitter_level:
+ bounds.lowerBound = 0;
+ bounds.upperBound = ZSTD_BLOCKSPLITTER_LEVEL_MAX;
+ return bounds;
+
case ZSTD_c_useRowMatchFinder:
bounds.lowerBound = (int)ZSTD_ps_auto;
bounds.upperBound = (int)ZSTD_ps_disable;
case ZSTD_c_minMatch:
case ZSTD_c_targetLength:
case ZSTD_c_strategy:
+ case ZSTD_c_blockSplitter_level:
return 1;
case ZSTD_c_format:
case ZSTD_c_blockDelimiters:
case ZSTD_c_validateSequences:
case ZSTD_c_useBlockSplitter:
+ case ZSTD_c_blockSplitter_level:
case ZSTD_c_useRowMatchFinder:
case ZSTD_c_deterministicRefPrefix:
case ZSTD_c_prefetchCDictTables:
CCtxParams->postBlockSplitter = (ZSTD_paramSwitch_e)value;
return CCtxParams->postBlockSplitter;
+ case ZSTD_c_blockSplitter_level:
+ BOUNDCHECK(ZSTD_c_blockSplitter_level, value);
+ CCtxParams->preBlockSplitter_level = value;
+ return (size_t)CCtxParams->preBlockSplitter_level;
+
case ZSTD_c_useRowMatchFinder:
BOUNDCHECK(ZSTD_c_useRowMatchFinder, value);
CCtxParams->useRowMatchFinder = (ZSTD_paramSwitch_e)value;
case ZSTD_c_useBlockSplitter :
*value = (int)CCtxParams->postBlockSplitter;
break;
+ case ZSTD_c_blockSplitter_level :
+ *value = CCtxParams->preBlockSplitter_level;
+ break;
case ZSTD_c_useRowMatchFinder :
*value = (int)CCtxParams->useRowMatchFinder;
break;
* ZSTD_c_prefetchCDictTables
* ZSTD_c_enableSeqProducerFallback
* ZSTD_c_maxBlockSize
+ * ZSTD_c_blockSplitter_level
* Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
* note : never ever use experimentalParam? names directly;
* also, the enums values themselves are unstable and can still change.
ZSTD_c_experimentalParam16=1013,
ZSTD_c_experimentalParam17=1014,
ZSTD_c_experimentalParam18=1015,
- ZSTD_c_experimentalParam19=1016
+ ZSTD_c_experimentalParam19=1016,
+ ZSTD_c_experimentalParam20=1017
} ZSTD_cParameter;
typedef struct {
* that overrides the default ZSTD_BLOCKSIZE_MAX. It cannot be used to set upper
* bounds greater than ZSTD_BLOCKSIZE_MAX or bounds lower than 1KB (will make
* compressBound() inaccurate). Only currently meant to be used for testing.
- *
*/
#define ZSTD_c_maxBlockSize ZSTD_c_experimentalParam18
*/
#define ZSTD_c_searchForExternalRepcodes ZSTD_c_experimentalParam19
+/* ZSTD_c_blockSplitter_level
+ * note: this parameter only influences the first splitter stage,
+ * which is active before producing the sequences.
+ * ZSTD_c_useBlockSplitter influence the next splitter stage,
+ * which is active after sequence production,
+ * and is more accurate but also slower.
+ * Both can be combined.
+ * Allowed values are between 0 and 6.
+ * 0 means "auto", which will select a value depending on current ZSTD_c_strategy.
+ * 1 means no splitting.
+ * Then, values from 2 to 6 are sorted in increasing cpu load order.
+ *
+ * Note that currently the first block is never split,
+ * to ensure expansion guarantees in presence of incompressible data.
+ */
+#define ZSTD_BLOCKSPLITTER_LEVEL_MAX 6
+#define ZSTD_c_blockSplitter_level ZSTD_c_experimentalParam20
+
/*! ZSTD_CCtx_getParameter() :
* Get the requested compression parameter value, selected by enum ZSTD_cParameter,
* and store it into int* value.