mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Use new paramSwitch enum for LCM, row matchfinder, and block splitter
This commit is contained in:
@ -131,7 +131,7 @@ BMK_advancedParams_t BMK_initAdvancedParams(void) {
|
||||
0, /* ldmHashLog */
|
||||
0, /* ldmBuckSizeLog */
|
||||
0, /* ldmHashRateLog */
|
||||
ZSTD_lcm_auto, /* literalCompressionMode */
|
||||
ZSTD_ps_auto, /* literalCompressionMode */
|
||||
0 /* useRowMatchFinder */
|
||||
};
|
||||
return res;
|
||||
|
@ -116,7 +116,7 @@ typedef struct {
|
||||
int ldmHashLog;
|
||||
int ldmBucketSizeLog;
|
||||
int ldmHashRateLog;
|
||||
ZSTD_literalCompressionMode_e literalCompressionMode;
|
||||
ZSTD_paramSwitch_e literalCompressionMode;
|
||||
int useRowMatchFinder; /* use row-based matchfinder if possible */
|
||||
} BMK_advancedParams_t;
|
||||
|
||||
|
@ -320,7 +320,7 @@ struct FIO_prefs_s {
|
||||
size_t targetCBlockSize;
|
||||
int srcSizeHint;
|
||||
int testMode;
|
||||
ZSTD_literalCompressionMode_e literalCompressionMode;
|
||||
ZSTD_paramSwitch_e literalCompressionMode;
|
||||
|
||||
/* IO preferences */
|
||||
U32 removeSrcFile;
|
||||
@ -392,7 +392,7 @@ FIO_prefs_t* FIO_createPreferences(void)
|
||||
ret->targetCBlockSize = 0;
|
||||
ret->srcSizeHint = 0;
|
||||
ret->testMode = 0;
|
||||
ret->literalCompressionMode = ZSTD_lcm_auto;
|
||||
ret->literalCompressionMode = ZSTD_ps_auto;
|
||||
ret->excludeCompressedFiles = 0;
|
||||
ret->allowBlockDevices = 0;
|
||||
return ret;
|
||||
@ -510,7 +510,7 @@ void FIO_setTestMode(FIO_prefs_t* const prefs, int testMode) {
|
||||
|
||||
void FIO_setLiteralCompressionMode(
|
||||
FIO_prefs_t* const prefs,
|
||||
ZSTD_literalCompressionMode_e mode) {
|
||||
ZSTD_paramSwitch_e mode) {
|
||||
prefs->literalCompressionMode = mode;
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ void FIO_setSrcSizeHint(FIO_prefs_t* const prefs, size_t srcSizeHint);
|
||||
void FIO_setTestMode(FIO_prefs_t* const prefs, int testMode);
|
||||
void FIO_setLiteralCompressionMode(
|
||||
FIO_prefs_t* const prefs,
|
||||
ZSTD_literalCompressionMode_e mode);
|
||||
ZSTD_paramSwitch_e mode);
|
||||
|
||||
void FIO_setProgressSetting(FIO_progressSetting_e progressSetting);
|
||||
void FIO_setNotificationLevel(int level);
|
||||
|
@ -804,7 +804,7 @@ int main(int argCount, const char* argv[])
|
||||
#ifndef ZSTD_NOBENCH
|
||||
BMK_advancedParams_t benchParams = BMK_initAdvancedParams();
|
||||
#endif
|
||||
ZSTD_literalCompressionMode_e literalCompressionMode = ZSTD_lcm_auto;
|
||||
ZSTD_paramSwitch_e literalCompressionMode = ZSTD_ps_auto;
|
||||
|
||||
|
||||
/* init */
|
||||
@ -900,8 +900,8 @@ int main(int argCount, const char* argv[])
|
||||
if (!strcmp(argument, "--format=lz4")) { suffix = LZ4_EXTENSION; FIO_setCompressionType(prefs, FIO_lz4Compression); continue; }
|
||||
#endif
|
||||
if (!strcmp(argument, "--rsyncable")) { rsyncable = 1; continue; }
|
||||
if (!strcmp(argument, "--compress-literals")) { literalCompressionMode = ZSTD_lcm_huffman; continue; }
|
||||
if (!strcmp(argument, "--no-compress-literals")) { literalCompressionMode = ZSTD_lcm_uncompressed; continue; }
|
||||
if (!strcmp(argument, "--compress-literals")) { literalCompressionMode = ZSTD_ps_enable; continue; }
|
||||
if (!strcmp(argument, "--no-compress-literals")) { literalCompressionMode = ZSTD_ps_disable; continue; }
|
||||
if (!strcmp(argument, "--no-progress")) { FIO_setProgressSetting(FIO_ps_never); continue; }
|
||||
if (!strcmp(argument, "--progress")) { FIO_setProgressSetting(FIO_ps_always); continue; }
|
||||
if (!strcmp(argument, "--exclude-compressed")) { FIO_setExcludeCompressedFile(prefs, 1); continue; }
|
||||
|
Reference in New Issue
Block a user