fixed ZSTD_copyCCtx
This commit is contained in:
+2
-1
@@ -228,7 +228,7 @@ static size_t ZSTD_resetCCtx_advanced (ZSTD_CCtx* zc,
|
|||||||
size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx)
|
size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx)
|
||||||
{
|
{
|
||||||
const U32 contentLog = (srcCCtx->params.strategy == ZSTD_fast) ? 1 : srcCCtx->params.contentLog;
|
const U32 contentLog = (srcCCtx->params.strategy == ZSTD_fast) ? 1 : srcCCtx->params.contentLog;
|
||||||
const size_t tableSpace = ((1 << contentLog) + (1 << srcCCtx->params.hashLog)) * sizeof(U32);
|
const size_t tableSpace = ((1 << contentLog) + (1 << srcCCtx->params.hashLog) + (1 << srcCCtx->params.hashLog3)) * sizeof(U32);
|
||||||
|
|
||||||
if (srcCCtx->stage!=0) return ERROR(stage_wrong);
|
if (srcCCtx->stage!=0) return ERROR(stage_wrong);
|
||||||
|
|
||||||
@@ -243,6 +243,7 @@ size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx)
|
|||||||
|
|
||||||
/* copy dictionary pointers */
|
/* copy dictionary pointers */
|
||||||
dstCCtx->nextToUpdate= srcCCtx->nextToUpdate;
|
dstCCtx->nextToUpdate= srcCCtx->nextToUpdate;
|
||||||
|
dstCCtx->nextToUpdate3 = srcCCtx->nextToUpdate3;
|
||||||
dstCCtx->nextSrc = srcCCtx->nextSrc;
|
dstCCtx->nextSrc = srcCCtx->nextSrc;
|
||||||
dstCCtx->base = srcCCtx->base;
|
dstCCtx->base = srcCCtx->base;
|
||||||
dstCCtx->dictBase = srcCCtx->dictBase;
|
dstCCtx->dictBase = srcCCtx->dictBase;
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx)
|
|||||||
dctx->dictEnd = NULL;
|
dctx->dictEnd = NULL;
|
||||||
dctx->hufTableX4[0] = HufLog;
|
dctx->hufTableX4[0] = HufLog;
|
||||||
dctx->flagStaticTables = 0;
|
dctx->flagStaticTables = 0;
|
||||||
|
dctx->params.searchLength = MINMATCH;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user