Add ZSTD_CCtx_resetParameters() function

* Fix docs for `ZSTD_CCtx_reset()`.
* Add `ZSTD_CCtx_resetParameters()`.

Fixes #1094.
This commit is contained in:
Nick Terrell
2018-04-12 16:54:07 -07:00
parent 3c3f59e68f
commit 9f76eebd17
3 changed files with 23 additions and 4 deletions
+6
View File
@@ -433,6 +433,12 @@ static int basicUnitTests(U32 seed, double compressibility)
CHECK_EQ(value, 7);
CHECK_Z(ZSTD_CCtx_getParameter(cctx, ZSTD_p_hashLog, &value));
CHECK_EQ(value, ZSTD_HASHLOG_MIN);
/* Reset the parameters */
ZSTD_CCtx_resetParameters(cctx);
CHECK_Z(ZSTD_CCtx_getParameter(cctx, ZSTD_p_compressionLevel, &value));
CHECK_EQ(value, 3);
CHECK_Z(ZSTD_CCtx_getParameter(cctx, ZSTD_p_hashLog, &value));
CHECK_EQ(value, 0);
ZSTD_freeCCtx(cctx);
}