CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_ldmHashLog, adv->ldmHashLog));
CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_ldmBucketSizeLog, adv->ldmBucketSizeLog));
CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_ldmHashRateLog, adv->ldmHashRateLog));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_windowLog, comprParams->windowLog));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_hashLog, comprParams->hashLog));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_chainLog, comprParams->chainLog));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_searchLog, comprParams->searchLog));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_minMatch, comprParams->minMatch));
- CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_targetLength, comprParams->targetLength));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_windowLog, (int)comprParams->windowLog));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_hashLog, (int)comprParams->hashLog));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_chainLog, (int)comprParams->chainLog));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_searchLog, (int)comprParams->searchLog));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_minMatch, (int)comprParams->minMatch));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_targetLength, (int)comprParams->targetLength));
+ CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_literalCompressionMode, (int)adv->literalCompressionMode));
CHECK_Z(ZSTD_CCtx_setParameter(ctx, ZSTD_c_strategy, comprParams->strategy));
CHECK_Z(ZSTD_CCtx_loadDictionary(ctx, dictBuffer, dictBufferSize));
}
} BMK_mode_t;
typedef struct {
- BMK_mode_t mode; /* 0: all, 1: compress only 2: decode only */
- unsigned nbSeconds; /* default timing is in nbSeconds */
- size_t blockSize; /* Maximum size of each block*/
- unsigned nbWorkers; /* multithreading */
- unsigned realTime; /* real time priority */
- int additionalParam; /* used by python speed benchmark */
- unsigned ldmFlag; /* enables long distance matching */
- unsigned ldmMinMatch; /* below: parameters for long distance matching, see zstd.1.md */
- unsigned ldmHashLog;
- unsigned ldmBucketSizeLog;
- unsigned ldmHashRateLog;
+ BMK_mode_t mode; /* 0: all, 1: compress only 2: decode only */
+ unsigned nbSeconds; /* default timing is in nbSeconds */
+ size_t blockSize; /* Maximum size of each block*/
+ int nbWorkers; /* multithreading */
+ unsigned realTime; /* real time priority */
+ int additionalParam; /* used by python speed benchmark */
+ int ldmFlag; /* enables long distance matching */
+ int ldmMinMatch; /* below: parameters for long distance matching, see zstd.1.md */
+ int ldmHashLog;
+ int ldmBucketSizeLog;
+ int ldmHashRateLog;
+ ZSTD_literalCompressionMode_e literalCompressionMode;
} BMK_advancedParams_t;
/* returns default parameters used by nonAdvanced functions */