removed useless variable from CCtx

CStream's pledgedSrcSize is no longer necessary
srcSize control is realized within bufferless interface.
This commit is contained in:
Yann Collet
2017-05-16 18:10:11 -07:00
parent 906a8f269a
commit 23c256e44b
3 changed files with 22 additions and 18 deletions
-2
View File
@@ -140,7 +140,6 @@ struct ZSTD_CCtx_s {
size_t outBuffFlushedSize;
ZSTD_cStreamStage streamStage;
U32 frameEnded;
U64 pledgedSrcSize;
};
ZSTD_CCtx* ZSTD_createCCtx(void)
@@ -3320,7 +3319,6 @@ static size_t ZSTD_resetCStream_internal(ZSTD_CStream* zcs, ZSTD_parameters para
zcs->outBuffContentSize = zcs->outBuffFlushedSize = 0;
zcs->streamStage = zcss_load;
zcs->frameEnded = 0;
zcs->pledgedSrcSize = pledgedSrcSize;
return 0; /* ready to go */
}
+2 -2
View File
@@ -647,7 +647,7 @@ typedef enum {
/* dictionary parameters */
ZSTD_p_refDictContent=300, /* Content of dictionary content will be referenced, instead of copied (default:0).
* This avoids duplicating dictionary content.
* But it also requires that dictionary buffer outlives its user (CCtx or CDict) */
* But it also requires that dictionary buffer outlives its user (CDict) */
/* Not ready yet ! */
ZSTD_p_rawContentDict, /* load dictionary in "content-only" mode (no header analysis) (default:0) */
/* question : should there be an option to load dictionary only in zstd format, rejecting others with an error code ? */
@@ -717,7 +717,7 @@ ZSTDLIB_API size_t ZSTD_CDict_setParameter(ZSTD_CDict* cdict, ZSTD_cParameter pa
ZSTDLIB_API size_t ZSTD_CDict_loadDictionary(ZSTD_CDict* cdict, const void* dict, size_t dictSize); /* Not ready yet ! */
/*! ZSTD_CCtx_refCDict() :
* Add a prepared dictionary to cctx, it will used for next compression jobs.
* Add a prepared dictionary to cctx, to be used for next compression jobs.
* Note that compression parameters will be enforced from within CDict.
* Currently, they supercede any compression parameter previously set within CCtx.
* The dictionary will remain valid for future compression jobs using same cctx.