1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

Change : zstd_opt_bt => zstd_btopt

This commit is contained in:
Yann Collet
2016-02-15 07:21:54 +01:00
parent 0d78a33374
commit cefef8cde7
4 changed files with 45 additions and 45 deletions

View File

@ -452,7 +452,7 @@ int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, double compressibilit
crcOrig = XXH64(sampleBuffer, sampleSize, 0);
/* compression test */
cLevelMod = MAX(1, 38 - (int)(MAX(9, sampleSizeLog) * 2)); /* use high compression levels with small samples, for speed */
cLevelMod = MAX(1, 38 - (int)(MAX(9, sampleSizeLog) * 2)); /* high levels only for small samples, for manageable speed */
cLevel = (FUZ_rand(&lseed) % cLevelMod) +1;
cSize = ZSTD_compressCCtx(ctx, cBuffer, cBufferSize, sampleBuffer, sampleSize, cLevel);
CHECK(ZSTD_isError(cSize), "ZSTD_compressCCtx failed");

View File

@ -407,7 +407,7 @@ const char* g_stratName[] = { "ZSTD_fast ",
"ZSTD_lazy2 ",
"ZSTD_btlazy2",
"ZSTD_opt ",
"ZSTD_opt_bt " };
"ZSTD_btopt " };
static void BMK_printWinner(FILE* f, U32 cLevel, BMK_result_t result, ZSTD_parameters params, size_t srcSize)
{
@ -549,7 +549,7 @@ static ZSTD_parameters* sanitizeParams(ZSTD_parameters params)
g_params = params;
if (params.strategy == ZSTD_fast)
g_params.contentLog = 0, g_params.searchLog = 0;
if ((params.strategy != ZSTD_opt) && (params.strategy != ZSTD_opt_bt))
if ((params.strategy != ZSTD_opt) && (params.strategy != ZSTD_btopt ))
g_params.targetLength = 0;
return &g_params;
}
@ -648,7 +648,7 @@ static void potentialRandomParams(ZSTD_parameters* p, U32 inverseChance)
p->windowLog = FUZ_rand(&g_rand) % (ZSTD_WINDOWLOG_MAX+1 - ZSTD_WINDOWLOG_MIN) + ZSTD_WINDOWLOG_MIN;
p->searchLength=FUZ_rand(&g_rand) % (ZSTD_SEARCHLENGTH_MAX+1 - ZSTD_SEARCHLENGTH_MIN) + ZSTD_SEARCHLENGTH_MIN;
p->targetLength=FUZ_rand(&g_rand) % (ZSTD_TARGETLENGTH_MAX+1 - ZSTD_TARGETLENGTH_MIN) + ZSTD_TARGETLENGTH_MIN;
p->strategy = (ZSTD_strategy) (FUZ_rand(&g_rand) % (ZSTD_opt_bt+1));
p->strategy = (ZSTD_strategy) (FUZ_rand(&g_rand) % (ZSTD_btopt +1));
ZSTD_validateParams(p);
}
}