@@ -990,8 +990,9 @@ ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
990
990
* @result : 0, or an error code (which can be tested with ZSTD_isError()).
991
991
* Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary,
992
992
* meaning "return to no-dictionary mode".
993
- * Note 1 : Dictionary is sticky, it will be used for all future compressed frames.
994
- * To return to "no-dictionary" situation, load a NULL dictionary (or reset parameters).
993
+ * Note 1 : Dictionary is sticky, it will be used for all future compressed frames,
994
+ * until parameters are reset, a new dictionary is loaded, or the dictionary
995
+ * is explicitly invalidated by loading a NULL dictionary.
995
996
* Note 2 : Loading a dictionary involves building tables.
996
997
* It's also a CPU consuming operation, with non-negligible impact on latency.
997
998
* Tables are dependent on compression parameters, and for this reason,
@@ -1004,7 +1005,7 @@ ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
1004
1005
ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary (ZSTD_CCtx* cctx, const void * dict, size_t dictSize);
1005
1006
1006
1007
/* ! ZSTD_CCtx_refCDict() : Requires v1.4.0+
1007
- * Reference a prepared dictionary, to be used for all next compressed frames.
1008
+ * Reference a prepared dictionary, to be used for all future compressed frames.
1008
1009
* Note that compression parameters are enforced from within CDict,
1009
1010
* and supersede any compression parameter previously set within CCtx.
1010
1011
* The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs.
@@ -1039,9 +1040,9 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx,
1039
1040
const void * prefix, size_t prefixSize);
1040
1041
1041
1042
/* ! ZSTD_DCtx_loadDictionary() : Requires v1.4.0+
1042
- * Create an internal DDict from dict buffer,
1043
- * to be used to decompress next frames.
1044
- * The dictionary remains valid for all future frames, until explicitly invalidated .
1043
+ * Create an internal DDict from dict buffer, to be used to decompress al future frames.
1044
+ * The dictionary remains valid for all future frames, until explicitly invalidated, or
1045
+ * a new dictionary is loaded .
1045
1046
* @result : 0, or an error code (which can be tested with ZSTD_isError()).
1046
1047
* Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
1047
1048
* meaning "return to no-dictionary mode".
@@ -1065,9 +1066,10 @@ ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, s
1065
1066
* The memory for the table is allocated on the first call to refDDict, and can be
1066
1067
* freed with ZSTD_freeDCtx().
1067
1068
*
1069
+ * If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary
1070
+ * will be managed, and referencing a dictionary effectively "discards" any previous one.
1071
+ *
1068
1072
* @result : 0, or an error code (which can be tested with ZSTD_isError()).
1069
- * Note 1 : Currently, only one dictionary can be managed.
1070
- * Referencing a new dictionary effectively "discards" any previous one.
1071
1073
* Special: referencing a NULL DDict means "return to no-dictionary mode".
1072
1074
* Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx.
1073
1075
*/
0 commit comments