Lines Matching full:compression

15 <li><a href="#Chapter5">Advanced compression API (Requires v1.4.0+)</a></li>
18 <li><a href="#Chapter8">Streaming compression - HowTo</a></li>
27 <li><a href="#Chapter17">Advanced compression functions</a></li>
31 <li><a href="#Chapter21">Buffer-less streaming compression (synchronous mode)</a></li>
37 zstd, short for Zstandard, is a fast lossless compression algorithm, targeting
38 real-time compression scenarios at zlib-level and better compression ratios.
39 The zstd compression library provides in-memory compression and decompression
42 The library supports regular compression levels from 1 up to ZSTD_maxCLevel(),
45 compression levels, which extend the range of speed vs. ratio preferences.
46 The lower the level, the faster the speed (at the cost of compression).
48 Compression can be done in:
51 - unbounded multiple steps (described as Streaming compression)
53 The compression ratio achievable on small data can be highly improved using
54 a dictionary. Dictionary compression can be performed in:
83 Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`.
113 …note 3 : decompressed size is always present when compression is completed using single-pass funct…
144 int ZSTD_minCLevel(void); </b>/*!< minimum negative compression level allowed…
145 int ZSTD_maxCLevel(void); </b>/*!< maximum compression level available */<b>
146 int ZSTD_defaultCLevel(void); </b>/*!< default compression level, specified by ZS…
150 <h3>Compression context</h3><pre> When compressing many times,
152 and re-use it for each successive compression operation.
155 It doesn't change the compression ratio, which remains identical.
169 this function compresses at requested compression level,
178 and re-use it for each successive compression operation.
194 <a name="Chapter5"></a><h2>Advanced compression API (Requires v1.4.0+)</h2><pre></pre>
211 </b>/* compression parameters<b>
215 …ZSTD_c_compressionLevel=100, </b>/* Set compression parameters according to pre-defined cLevel tab…
216 * Note that exact compression parameters are dynamically determined,
217 * depending on both compression level and srcSize (when known).
220 * Note 1 : it's possible to pass a negative compression level.
221 … * Note 2 : setting a level does not automatically set all other compression parameters
222 … * to default. Setting this will however eventually dynamically impact the compression
225 </b>/* Advanced compression parameters :<b>
226 * It's possible to pin down compression parameters to some specific values.
239 * Larger tables improve compression ratio of strategies <= dFast,
245 * Larger tables result in better and slower compression.
251 * More attempts result in better and slower compression.
257 … * Larger values increase compression and decompression speed, but decrease ratio.
265 * Larger values make compression stronger, and slower.
268 * Larger values make compression faster, and weaker.
272 * resulting in stronger and slower compression.
276 * This parameter is designed to improve compression ratio
282 … * compression strategy >= ZSTD_btopt (== compression level 16+) */
284 * Larger values increase memory usage and compression ratio,
285 * but decrease compression speed.
290 * Larger/too small values usually decrease compression ratio.
294 … * Larger values improve collision resolution but decrease compression speed.
300 * Larger values improve compression speed.
301 … * Deviating far from default value will likely result in a compression ratio decrease.
306 * Content size must be known at the beginning of compression.
321 * while compression is performed in parallel, within worker thread(s).
326 … * compression is performed inside Caller's thread, and all invocations are blocking */
327 …ZSTD_c_jobSize=401, </b>/* Size of a compression job. This value is enforced only when nbWork…
328 …* Each compression job is completed in parallel, so this value can indirectly impact the nb of act…
329 … * 0 means default, which is dynamically determined based on compression parameters.
334 … * It helps preserve compression ratio, while each job is compressed in parallel.
336 * Larger values increase compression ratio, but decrease speed.
399 </b><p> Set one compression parameter, selected by enum ZSTD_cParameter.
402 …g a parameter is generally only possible during frame initialization (before starting compression).
404 the following parameters can be updated _during_ compression (within same frame):
437 Useful after an error, or to interrupt any ongoing compression.
439 Compression parameters and dictionary remain unchanged.
444 … Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing)
453 </b><p> Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advan…
456 - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
457 - The function is always blocking, returns when compression is completed.
458 Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`.
502 </b><p> Set one compression parameter, selected by enum ZSTD_dParameter.
532 <a name="Chapter8"></a><h2>Streaming compression - HowTo</h2><pre>
535 ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
542 Parameters are sticky : when starting a new compression on the same context,
543 it will re-use the same sticky parameters as previous compression session.
597 <h3>Streaming compression functions</h3><pre></pre><b><pre>typedef enum {
598 …ct more data, encoder decides when to output compressed result, for optimal compression ratio */<b>
601 …ll continue: any future data can still reference previously compressed data, improving compression.
602 … * note : multithreaded compression will block to flush as much output as possible. */
607 … : note : multithreaded compression will block to flush as much output as possible. */
615 - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
616 …- Compression parameters cannot be changed once compression is started (save a list of exceptions …
632 Before starting a new compression job, or changing compression parameters,
703 </b><p> Compression at an explicit compression level using a Dictionary.
716 Dictionary must be identical to the one used during compression.
729 The resulting state can be used for future compression operations with very limited startup cost.
748 </b><p> Compression using a digested Dictionary.
750 Note : compression level is _decided at dictionary creation time_,
821 Tables are dependent on compression parameters, and for this reason,
822 compression parameters can no longer be changed after loading a dictionary.
832 Note that compression parameters are enforced from within CDict,
833 and supersede any compression parameter previously set within CCtx.
850 …erforms much faster, especially during decompression (compression speed is tunable with compressio…
853 Note 1 : Prefix buffer is referenced. It **must** outlive compression.
854 Its content must remain unmodified during compression.
858 …Note 3 : Referencing a prefix involves building tables, which are dependent on compression paramet…
904 and must use the same prefix as the one used during compression.
976 …unsigned windowLog; </b>/**< largest match distance : larger == more compression, more memor…
977 …unsigned chainLog; </b>/**< fully searched segment : larger == more compression, slower, mo…
979 unsigned searchLog; </b>/**< nb of searches : larger == more compression, slower */<b>
980 … </b>/**< match length searched : larger == faster decompression, sometimes less compression */<b>
981 …</b>/**< acceptable match size for optimal parser (only) : larger == more compression, slower */<b>
988 … no dictID will be saved into frame header (dictID is only useful for dictionary compression) */<b>
1035 * means that the compression can search both the dictionary and input
1037 * the compression faster per-byte of input. However, the initial copy of
1039 * compression. For small compressions (< 8 KB), that copy can dominate
1040 * the cost of the compression.
1042 * - The CDict's tables can be used in-place. In this model, compression is
1055 * at the beginning of a compression. However, if experimentation shows that
1066 …auto = 0, </b>/**< Automatically determine the compression mode based on the compression
1067 … * Negative compression levels will be uncompressed, and positive compression
1069 …ZSTD_lcm_huffman = 1, </b>/**< Always attempt Huffman compression. Uncompressed literals wil…
1070 * emitted if Huffman compression is not profitable. */
1097 note 2 : decompressed size is always present when compression is done with ZSTD_compress()
1142 zc can be used to insert custom compression params.
1171 The compression behavior changes based on cctx params. In particular:
1185 …ionLevel accordingly adjusts the strength of the entropy coder, as it would in typical compression.
1241 for any compression level up to selected one.
1250 because the CCtx compression context will need less memory.
1254 …Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limi…
1256 Note 2 : only single-threaded compression is supported.
1266 </b><p> ZSTD_estimateCStreamSize() will provide a budget large enough for any compression level up…
1270 …ed in tandem with ZSTD_CCtxParams_setParameter(). Only single-threaded compression is supported. T…
1271 Note : CStream size estimation is only correct for single-threaded compression.
1284 …ZSTD_estimateCDictSize_advanced() makes it possible to control compression parameters precisely, l…
1304 Note 3 : cParams : use ZSTD_getCParams() to convert a compression level
1333 </b><p> These prototypes make it possible to share a thread pool among multiple compression contex…
1335 a threaded compression mode (via ZSTD_c_nbWorkers parameter).
1344 <a name="Chapter17"></a><h2>Advanced compression functions</h2><pre></pre>
1347 </b><p> Create a digested dictionary for compression
1355 </b><p> @return ZSTD_compressionParameters structure for a selected compression level and estimated…
1416 </b><p> Get the requested compression parameter value, selected by enum ZSTD_cParameter,
1434 - ZSTD_compressStream2() : Do compression using the CCtx.
1438 for static allocation of CCtx for single-threaded compression.
1448 </b><p> Initializes the compression parameters of cctxParams according to
1449 compression level. All other parameters are reset to their default values.
1454 </b><p> Initializes the compression and frame parameters of cctxParams according to
1461 Set one compression parameter, selected by enum ZSTD_cParameter.
1471 Get the requested value of one compression parameter, selected by enum ZSTD_cParameter.
1478 </b><p> Apply a set of ZSTD_CCtx_params to the compression context.
1479 This can be done even after compression is started,
1480 if nbWorkers==0, this will have no impact until a new compression is started.
1574 <h3>Advanced Streaming compression functions</h3><pre></pre><b><pre></pre></b><BR>
1636 note : cdict will just be referenced, and must outlive compression session
1744 <a name="Chapter21"></a><h2>Buffer-less streaming compression (synchronous mode)</h2><pre>
1747 ZSTD_CCtx object can be re-used multiple times within successive compression operations.
1750 Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
1759 ZSTD_compressContinue() doesn't guarantee recover after a failed compression.
1772 <h3>Buffer-less streaming compression functions</h3><pre></pre><b><pre>ZSTDLIB_STATIC_API size_t ZS…
1817 Finally, if you control the compression process, you can also ignore all buffer size rules,
1884 + compression : any ZSTD_compressBegin*() variant, including with dictionary