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:
114 …note 3 : decompressed size is always present when compression is completed using single-pass funct…
145 * When invoking `ZSTD_compress()` or any other one-pass compression function,
169 int ZSTD_minCLevel(void); </b>/*!< minimum negative compression level allowed…
170 int ZSTD_maxCLevel(void); </b>/*!< maximum compression level available */<b>
171 int ZSTD_defaultCLevel(void); </b>/*!< default compression level, specified by ZS…
175 <h3>Compression context</h3><pre> When compressing many times,
177 and reuse it for each successive compression operation.
180 It doesn't change the compression ratio, which remains identical.
194 this function compresses at the requested compression level,
203 and reuse it for each successive compression operation.
219 <a name="Chapter5"></a><h2>Advanced compression API (Requires v1.4.0+)</h2><pre></pre>
236 </b>/* compression parameters<b>
240 …ZSTD_c_compressionLevel=100, </b>/* Set compression parameters according to pre-defined cLevel tab…
241 * Note that exact compression parameters are dynamically determined,
242 * depending on both compression level and srcSize (when known).
245 * Note 1 : it's possible to pass a negative compression level.
246 … * Note 2 : setting a level does not automatically set all other compression parameters
247 … * to default. Setting this will however eventually dynamically impact the compression
250 </b>/* Advanced compression parameters :<b>
251 * It's possible to pin down compression parameters to some specific values.
264 * Larger tables improve compression ratio of strategies <= dFast,
270 * Larger tables result in better and slower compression.
276 * More attempts result in better and slower compression.
282 … * Larger values increase compression and decompression speed, but decrease ratio.
290 * Larger values make compression stronger, and slower.
293 * Larger values make compression faster, and weaker.
297 * resulting in stronger and slower compression.
314 * This parameter is designed to improve compression ratio
320 … * compression strategy >= ZSTD_btopt (== compression level 16+) */
322 * Larger values increase memory usage and compression ratio,
323 * but decrease compression speed.
328 * Larger/too small values usually decrease compression ratio.
332 … * Larger values improve collision resolution but decrease compression speed.
338 * Larger values improve compression speed.
339 … * Deviating far from default value will likely result in a compression ratio decrease.
344 * Content size must be known at the beginning of compression.
359 * while compression is performed in parallel, within worker thread(s).
364 … * compression is performed inside Caller's thread, and all invocations are blocking */
365 …ZSTD_c_jobSize=401, </b>/* Size of a compression job. This value is enforced only when nbWork…
366 …* Each compression job is completed in parallel, so this value can indirectly impact the nb of act…
367 … * 0 means default, which is dynamically determined based on compression parameters.
372 … * It helps preserve compression ratio, while each job is compressed in parallel.
374 * Larger values increase compression ratio, but decrease speed.
443 </b><p> Set one compression parameter, selected by enum ZSTD_cParameter.
446 …g a parameter is generally only possible during frame initialization (before starting compression).
448 the following parameters can be updated _during_ compression (within same frame):
481 Useful after an error, or to interrupt any ongoing compression.
483 Compression parameters and dictionary remain unchanged.
488 … Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing)
497 </b><p> Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advan…
498 (note that this entry point doesn't even expose a compression level parameter).
501 - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
502 - The function is always blocking, returns when compression is completed.
552 </b><p> Set one compression parameter, selected by enum ZSTD_dParameter.
582 <a name="Chapter8"></a><h2>Streaming compression - HowTo</h2><pre>
585 ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
592 Parameters are sticky : when starting a new compression on the same context,
593 it will reuse the same sticky parameters as previous compression session.
647 <h3>Streaming compression functions</h3><pre></pre><b><pre>typedef enum {
648 …ct more data, encoder decides when to output compressed result, for optimal compression ratio */<b>
651 …ll continue: any future data can still reference previously compressed data, improving compression.
652 … * note : multithreaded compression will block to flush as much output as possible. */
657 … : note : multithreaded compression will block to flush as much output as possible. */
665 - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
666 …- Compression parameters cannot be changed once compression is started (save a list of exceptions …
682 Before starting a new compression job, or changing compression parameters,
688 …or is sometimes implied by methods starting a new compression job (ZSTD_initCStream(), ZSTD_compre…
794 </b><p> Compression at an explicit compression level using a Dictionary.
807 Dictionary must be identical to the one used during compression.
820 The resulting state can be used for future compression operations with very limited startup cost.
839 </b><p> Compression using a digested Dictionary.
841 Note : compression level is _decided at dictionary creation time_,
915 Tables are dependent on compression parameters, and for this reason,
916 compression parameters can no longer be changed after loading a dictionary.
930 Note that compression parameters are enforced from within CDict,
931 and supersede any compression parameter previously set within CCtx.
948 …erforms much faster, especially during decompression (compression speed is tunable with compressio…
952 Note 1 : Prefix buffer is referenced. It **must** outlive compression.
953 Its content must remain unmodified during compression.
957 …Note 3 : Referencing a prefix involves building tables, which are dependent on compression paramet…
1004 and must use the same prefix as the one used during compression.
1076 …unsigned windowLog; </b>/**< largest match distance : larger == more compression, more memor…
1077 …unsigned chainLog; </b>/**< fully searched segment : larger == more compression, slower, mo…
1079 unsigned searchLog; </b>/**< nb of searches : larger == more compression, slower */<b>
1080 … </b>/**< match length searched : larger == faster decompression, sometimes less compression */<b>
1081 …</b>/**< acceptable match size for optimal parser (only) : larger == more compression, slower */<b>
1088 … no dictID will be saved into frame header (dictID is only useful for dictionary compression) */<b>
1135 * means that the compression can search both the dictionary and input
1137 * the compression faster per-byte of input. However, the initial copy of
1139 * compression. For small compressions (< 8 KB), that copy can dominate
1140 * the cost of the compression.
1142 * - The CDict's tables can be used in-place. In this model, compression is
1155 * at the beginning of a compression. However, if experimentation shows that
1166 …auto = 0, </b>/**< Automatically determine the compression mode based on the compression
1167 … * Negative compression levels will be uncompressed, and positive compression
1169 …ZSTD_lcm_huffman = 1, </b>/**< Always attempt Huffman compression. Uncompressed literals wil…
1170 * emitted if Huffman compression is not profitable. */
1197 note 2 : decompressed size is always present when compression is done with ZSTD_compress()
1321 @zc can be used to insert custom compression params.
1353 The compression behavior changes based on cctx params. In particular:
1367 …ionLevel accordingly adjusts the strength of the entropy coder, as it would in typical compression.
1425 to compress data of any size using one-shot compression ZSTD_compressCCtx() or ZSTD_compress2()
1426 associated with any compression level up to max specified one.
1430 Note that the size estimation is specific for one-shot compression,
1440 …Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limi…
1442 Note : only single-threaded compression is supported.
1452 …<p> ZSTD_estimateCStreamSize() will provide a memory budget large enough for streaming compression
1453 using any compression level up to the max specified one.
1457 …ed in tandem with ZSTD_CCtxParams_setParameter(). Only single-threaded compression is supported. T…
1458 Note : CStream size estimation is only correct for single-threaded compression.
1477 …ZSTD_estimateCDictSize_advanced() makes it possible to control compression parameters precisely, l…
1497 Note 3 : cParams : use ZSTD_getCParams() to convert a compression level
1526 </b><p> These prototypes make it possible to share a thread pool among multiple compression contex…
1528 a threaded compression mode (via ZSTD_c_nbWorkers parameter).
1537 <a name="Chapter17"></a><h2>Advanced compression functions</h2><pre></pre>
1540 </b><p> Create a digested dictionary for compression
1548 </b><p> @return ZSTD_compressionParameters structure for a selected compression level and estimated…
1572 Note : if modifying parameters during compression (MT mode only),
1632 </b><p> Get the requested compression parameter value, selected by enum ZSTD_cParameter,
1650 - ZSTD_compressStream2() : Do compression using the CCtx.
1654 for static allocation of CCtx for single-threaded compression.
1664 </b><p> Initializes the compression parameters of cctxParams according to
1665 compression level. All other parameters are reset to their default values.
1670 </b><p> Initializes the compression and frame parameters of cctxParams according to
1677 Set one compression parameter, selected by enum ZSTD_cParameter.
1687 Get the requested value of one compression parameter, selected by enum ZSTD_cParameter.
1694 </b><p> Apply a set of ZSTD_CCtx_params to the compression context.
1695 This can be done even after compression is started,
1696 if nbWorkers==0, this will have no impact until a new compression is started.
1791 <h3>Advanced Streaming compression functions</h3><pre></pre><b><pre></pre></b><BR>
1854 note : cdict will just be referenced, and must outlive compression session
1964 compressions. It will remain set until the user explicitly resets compression
1968 part of the "advanced API". This means it will only have an effect on compression
1970 Older compression APIs such as compressCCtx(), which predate the introduction of
1998 It allows streaming (de)compression with user allocated buffers.
2009 <a name="Chapter21"></a><h2>Buffer-less streaming compression (synchronous mode)</h2><pre>
2012 ZSTD_CCtx object can be reused multiple times within successive compression operations.
2015 Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
2023 ZSTD_compressContinue() doesn't guarantee recover after a failed compression.
2036 <h3>Buffer-less streaming compression functions</h3><pre></pre><b><pre>ZSTD_DEPRECATED("The buffer-…
2085 Finally, if you control the compression process, you can also ignore all buffer size rules,
2143 + compression : any ZSTD_compressBegin*() variant, including with dictionary
2160 …re>ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
2162 ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
2164 ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
2166 ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")