ZSTD_setAdditionalParam
This commit is contained in:
@@ -47,7 +47,3 @@ ipch/
|
|||||||
.directory
|
.directory
|
||||||
_codelite
|
_codelite
|
||||||
_zstdbench
|
_zstdbench
|
||||||
|
|
||||||
lib/zstd_opt_LZ5.c
|
|
||||||
lib/zstd_opt_llen.c
|
|
||||||
lib/zstd_opt_nollen.c
|
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ struct ZSTD_CCtx_s
|
|||||||
U32 nextToUpdate3; /* index from which to continue dictionary update */
|
U32 nextToUpdate3; /* index from which to continue dictionary update */
|
||||||
U32 loadedDictEnd;
|
U32 loadedDictEnd;
|
||||||
U32 stage;
|
U32 stage;
|
||||||
|
U32 additionalParam;
|
||||||
ZSTD_parameters params;
|
ZSTD_parameters params;
|
||||||
void* workSpace;
|
void* workSpace;
|
||||||
size_t workSpaceSize;
|
size_t workSpaceSize;
|
||||||
@@ -273,6 +274,7 @@ size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx)
|
|||||||
dstCCtx->dictLimit = srcCCtx->dictLimit;
|
dstCCtx->dictLimit = srcCCtx->dictLimit;
|
||||||
dstCCtx->lowLimit = srcCCtx->lowLimit;
|
dstCCtx->lowLimit = srcCCtx->lowLimit;
|
||||||
dstCCtx->loadedDictEnd = srcCCtx->loadedDictEnd;
|
dstCCtx->loadedDictEnd = srcCCtx->loadedDictEnd;
|
||||||
|
dstCCtx->additionalParam = srcCCtx->additionalParam;
|
||||||
|
|
||||||
/* copy entropy tables */
|
/* copy entropy tables */
|
||||||
dstCCtx->flagStaticTables = srcCCtx->flagStaticTables;
|
dstCCtx->flagStaticTables = srcCCtx->flagStaticTables;
|
||||||
@@ -2421,3 +2423,5 @@ ZSTD_parameters ZSTD_getParams(int compressionLevel, U64 srcSizeHint)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZSTD_setAdditionalParam(ZSTD_CCtx* ctx, int additionalParam) { ctx->additionalParam = additionalParam; };
|
||||||
|
|||||||
@@ -34,3 +34,8 @@ paramgrill
|
|||||||
# Default result files
|
# Default result files
|
||||||
dictionary
|
dictionary
|
||||||
grillResults.txt
|
grillResults.txt
|
||||||
|
_*
|
||||||
|
|
||||||
|
# Misc files
|
||||||
|
*.bat
|
||||||
|
fileTests.sh
|
||||||
|
|||||||
+4
-1
@@ -435,7 +435,7 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize,
|
|||||||
memset(&result, 0, sizeof(result));
|
memset(&result, 0, sizeof(result));
|
||||||
memset(&total, 0, sizeof(total));
|
memset(&total, 0, sizeof(total));
|
||||||
|
|
||||||
if (g_displayLevel == 1)
|
if (g_displayLevel == 1 && !additionalParam)
|
||||||
DISPLAY("bench %s: input %u bytes, %i iterations, %u KB blocks\n", ZSTD_VERSION, (U32)benchedSize, nbIterations, (U32)(g_blockSize>>10));
|
DISPLAY("bench %s: input %u bytes, %i iterations, %u KB blocks\n", ZSTD_VERSION, (U32)benchedSize, nbIterations, (U32)(g_blockSize>>10));
|
||||||
|
|
||||||
if (cLevelLast < cLevel) cLevelLast = cLevel;
|
if (cLevelLast < cLevel) cLevelLast = cLevel;
|
||||||
@@ -446,6 +446,9 @@ static void BMK_benchCLevel(void* srcBuffer, size_t benchedSize,
|
|||||||
fileSizes, nbFiles,
|
fileSizes, nbFiles,
|
||||||
dictBuffer, dictBufferSize, &result);
|
dictBuffer, dictBufferSize, &result);
|
||||||
if (g_displayLevel == 1) {
|
if (g_displayLevel == 1) {
|
||||||
|
if (additionalParam)
|
||||||
|
DISPLAY("%-3i%11i (%5.3f) %6.1f MB/s %6.1f MB/s %s (p=%d)\n", -l, (int)result.cSize, result.ratio, result.cSpeed, result.dSpeed, displayName, additionalParam);
|
||||||
|
else
|
||||||
DISPLAY("%-3i%11i (%5.3f) %6.1f MB/s %6.1f MB/s %s\n", -l, (int)result.cSize, result.ratio, result.cSpeed, result.dSpeed, displayName);
|
DISPLAY("%-3i%11i (%5.3f) %6.1f MB/s %6.1f MB/s %s\n", -l, (int)result.cSize, result.ratio, result.cSpeed, result.dSpeed, displayName);
|
||||||
total.cSize += result.cSize;
|
total.cSize += result.cSize;
|
||||||
total.cSpeed += result.cSpeed;
|
total.cSpeed += result.cSpeed;
|
||||||
|
|||||||
Reference in New Issue
Block a user