Also Attach Dict When Source Size is Unknown
This commit is contained in:
@@ -1208,7 +1208,8 @@ static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx,
|
|||||||
* context, or referencing the dictionary context from the working context
|
* context, or referencing the dictionary context from the working context
|
||||||
* in-place. We decide here which strategy to use. */
|
* in-place. We decide here which strategy to use. */
|
||||||
/* TODO: pick reasonable cut-off size, handle ZSTD_CONTENTSIZE_UNKNOWN */
|
/* TODO: pick reasonable cut-off size, handle ZSTD_CONTENTSIZE_UNKNOWN */
|
||||||
int attachDict = pledgedSrcSize <= 8 KB
|
int attachDict = ( pledgedSrcSize <= 8 KB
|
||||||
|
|| pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN )
|
||||||
&& cdict->cParams.strategy == ZSTD_fast
|
&& cdict->cParams.strategy == ZSTD_fast
|
||||||
&& ZSTD_equivalentCParams(cctx->appliedParams.cParams,
|
&& ZSTD_equivalentCParams(cctx->appliedParams.cParams,
|
||||||
cdict->cParams);
|
cdict->cParams);
|
||||||
|
|||||||
Reference in New Issue
Block a user