diff options
Diffstat (limited to 'doc/zstd_manual.html')
-rw-r--r-- | doc/zstd_manual.html | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/doc/zstd_manual.html b/doc/zstd_manual.html index 43c5555b8ca85..fe58f78cb1536 100644 --- a/doc/zstd_manual.html +++ b/doc/zstd_manual.html @@ -1,10 +1,10 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<title>zstd 1.4.4 Manual</title> +<title>zstd 1.4.5 Manual</title> </head> <body> -<h1>zstd 1.4.4 Manual</h1> +<h1>zstd 1.4.5 Manual</h1> <hr> <a name="Contents"></a><h2>Contents</h2> <ol> @@ -217,7 +217,10 @@ size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx); * Default level is ZSTD_CLEVEL_DEFAULT==3. * Special: value 0 means default, which is controlled by ZSTD_CLEVEL_DEFAULT. * Note 1 : it's possible to pass a negative compression level. - * Note 2 : setting a level resets all other compression parameters to default */ + * Note 2 : setting a level does not automatically set all other compression parameters + * to default. Setting this will however eventually dynamically impact the compression + * parameters which have not been manually set. The manually set + * ones will 'stick'. */ </b>/* Advanced compression parameters :<b> * It's possible to pin down compression parameters to some specific values. * In which case, these values are no longer dynamically selected by the compressor */ @@ -451,11 +454,13 @@ size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx); </b>/* note : additional experimental parameters are also available<b> * within the experimental section of the API. * At the time of this writing, they include : - * ZSTD_c_format + * ZSTD_d_format + * ZSTD_d_stableOutBuffer * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them. * note : never ever use experimentalParam? names directly */ - ZSTD_d_experimentalParam1=1000 + ZSTD_d_experimentalParam1=1000, + ZSTD_d_experimentalParam2=1001 } ZSTD_dParameter; </b></pre><BR> @@ -1055,23 +1060,28 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict); size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams); size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params); size_t ZSTD_estimateDCtxSize(void); -</b><p> These functions make it possible to estimate memory usage of a future - {D,C}Ctx, before its creation. - - ZSTD_estimateCCtxSize() will provide a budget large enough for any - compression level up to selected one. Unlike ZSTD_estimateCStreamSize*(), - this estimate does not include space for a window buffer, so this estimate - is guaranteed to be enough for single-shot compressions, but not streaming - compressions. It will however assume the input may be arbitrarily large, - which is the worst case. If srcSize is known to always be small, - ZSTD_estimateCCtxSize_usingCParams() can provide a tighter estimation. - ZSTD_estimateCCtxSize_usingCParams() can be used in tandem with - ZSTD_getCParams() to create cParams from compressionLevel. - ZSTD_estimateCCtxSize_usingCCtxParams() can be used in tandem with - ZSTD_CCtxParams_setParameter(). - - Note: only single-threaded compression is supported. This function will - return an error code if ZSTD_c_nbWorkers is >= 1. +</b><p> These functions make it possible to estimate memory usage + of a future {D,C}Ctx, before its creation. + + ZSTD_estimateCCtxSize() will provide a memory budget large enough + for any compression level up to selected one. + Note : Unlike ZSTD_estimateCStreamSize*(), this estimate + does not include space for a window buffer. + Therefore, the estimation is only guaranteed for single-shot compressions, not streaming. + The estimate will assume the input may be arbitrarily large, + which is the worst case. + + When srcSize can be bound by a known and rather "small" value, + this fact can be used to provide a tighter estimation + because the CCtx compression context will need less memory. + This tighter estimation can be provided by more advanced functions + ZSTD_estimateCCtxSize_usingCParams(), which can be used in tandem with ZSTD_getCParams(), + and ZSTD_estimateCCtxSize_usingCCtxParams(), which can be used in tandem with ZSTD_CCtxParams_setParameter(). + Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limits. + + Note 2 : only single-threaded compression is supported. + ZSTD_estimateCCtxSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. + </p></pre><BR> <pre><b>size_t ZSTD_estimateCStreamSize(int compressionLevel); |