added ZSTD_DCtx_reset()

This commit is contained in:
Yann Collet
2017-09-25 16:56:48 -07:00
parent f2a913862c
commit 52a1d1c6dc
4 changed files with 47 additions and 13 deletions
+2 -2
View File
@@ -941,11 +941,11 @@ static int basicUnitTests(U32 seed, double compressibility)
}
DISPLAYLEVEL(4, "test%3i : decompress with magic-less instruction : ", testNb++);
CHECK( ZSTD_initDStream(dctx) );
ZSTD_DCtx_reset(dctx);
CHECK( ZSTD_DCtx_setFormat(dctx, ZSTD_f_zstd1_magicless) );
{ ZSTD_inBuffer in = { compressedBuffer, cSize, 0 };
ZSTD_outBuffer out = { decodedBuffer, CNBuffSize, 0 };
size_t const result = ZSTD_decompressStream(dctx, &out, &in);
size_t const result = ZSTD_decompress_generic(dctx, &out, &in);
if (result != 0) goto _output_error;
if (in.pos != in.size) goto _output_error;
if (out.pos != inputSize) goto _output_error;