|
1 | 1 | <html>
|
2 | 2 | <head>
|
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
4 |
| -<title>zstd 1.4.8 Manual</title> |
| 4 | +<title>zstd 1.4.9 Manual</title> |
5 | 5 | </head>
|
6 | 6 | <body>
|
7 |
| -<h1>zstd 1.4.8 Manual</h1> |
| 7 | +<h1>zstd 1.4.9 Manual</h1> |
8 | 8 | <hr>
|
9 | 9 | <a name="Contents"></a><h2>Contents</h2>
|
10 | 10 | <ol>
|
@@ -473,12 +473,14 @@ <h3>Decompression context</h3><pre> When decompressing many times,
|
473 | 473 | * ZSTD_d_format
|
474 | 474 | * ZSTD_d_stableOutBuffer
|
475 | 475 | * ZSTD_d_forceIgnoreChecksum
|
| 476 | + * ZSTD_d_refMultipleDDicts |
476 | 477 | * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
|
477 | 478 | * note : never ever use experimentalParam? names directly
|
478 | 479 | */
|
479 | 480 | ZSTD_d_experimentalParam1=1000,
|
480 | 481 | ZSTD_d_experimentalParam2=1001,
|
481 |
| - ZSTD_d_experimentalParam3=1002 |
| 482 | + ZSTD_d_experimentalParam3=1002, |
| 483 | + ZSTD_d_experimentalParam4=1003 |
482 | 484 |
|
483 | 485 | } ZSTD_dParameter;
|
484 | 486 | </b></pre><BR>
|
@@ -816,7 +818,7 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
816 | 818 | </b><p> Reference a prepared dictionary, to be used for all next compressed frames.
|
817 | 819 | Note that compression parameters are enforced from within CDict,
|
818 | 820 | and supersede any compression parameter previously set within CCtx.
|
819 |
| - The parameters ignored are labled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. |
| 821 | + The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. |
820 | 822 | The ignored parameters will be used again if the CCtx is returned to no-dictionary mode.
|
821 | 823 | The dictionary will remain valid for future compressed frames using same CCtx.
|
822 | 824 | @result : 0, or an error code (which can be tested with ZSTD_isError()).
|
@@ -867,6 +869,13 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
867 | 869 | <pre><b>size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
|
868 | 870 | </b><p> Reference a prepared dictionary, to be used to decompress next frames.
|
869 | 871 | The dictionary remains active for decompression of future frames using same DCtx.
|
| 872 | + |
| 873 | + If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function |
| 874 | + will store the DDict references in a table, and the DDict used for decompression |
| 875 | + will be determined at decompression time, as per the dict ID in the frame. |
| 876 | + The memory for the table is allocated on the first call to refDDict, and can be |
| 877 | + freed with ZSTD_freeDCtx(). |
| 878 | + |
870 | 879 | @result : 0, or an error code (which can be tested with ZSTD_isError()).
|
871 | 880 | Note 1 : Currently, only one dictionary can be managed.
|
872 | 881 | Referencing a new dictionary effectively "discards" any previous one.
|
@@ -995,6 +1004,12 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
995 | 1004 | ZSTD_d_ignoreChecksum = 1
|
996 | 1005 | } ZSTD_forceIgnoreChecksum_e;
|
997 | 1006 | </b></pre><BR>
|
| 1007 | +<pre><b>typedef enum { |
| 1008 | + </b>/* Note: this enum controls ZSTD_d_refMultipleDDicts */<b> |
| 1009 | + ZSTD_rmd_refSingleDDict = 0, |
| 1010 | + ZSTD_rmd_refMultipleDDicts = 1 |
| 1011 | +} ZSTD_refMultipleDDicts_e; |
| 1012 | +</b></pre><BR> |
998 | 1013 | <pre><b>typedef enum {
|
999 | 1014 | </b>/* Note: this enum and the behavior it controls are effectively internal<b>
|
1000 | 1015 | * implementation details of the compressor. They are expected to continue
|
@@ -1073,7 +1088,7 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
1073 | 1088 | `srcSize` must be the _exact_ size of this series
|
1074 | 1089 | (i.e. there should be a frame boundary at `src + srcSize`)
|
1075 | 1090 | @return : - upper-bound for the decompressed size of all data in all successive frames
|
1076 |
| - - if an error occured: ZSTD_CONTENTSIZE_ERROR |
| 1091 | + - if an error occurred: ZSTD_CONTENTSIZE_ERROR |
1077 | 1092 |
|
1078 | 1093 | note 1 : an error can occur if `src` contains an invalid or incorrectly formatted frame.
|
1079 | 1094 | note 2 : the upper-bound is exact when the decompressed size field is available in every ZSTD encoded frame of `src`.
|
@@ -1155,6 +1170,22 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
1155 | 1170 |
|
1156 | 1171 | </p></pre><BR>
|
1157 | 1172 |
|
| 1173 | +<pre><b>size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity, |
| 1174 | + const void* src, size_t srcSize, unsigned magicVariant); |
| 1175 | +</b><p> Generates a zstd skippable frame containing data given by src, and writes it to dst buffer. |
| 1176 | + |
| 1177 | + Skippable frames begin with a a 4-byte magic number. There are 16 possible choices of magic number, |
| 1178 | + ranging from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15. |
| 1179 | + As such, the parameter magicVariant controls the exact skippable frame magic number variant used, so |
| 1180 | + the magic number used will be ZSTD_MAGIC_SKIPPABLE_START + magicVariant. |
| 1181 | + |
| 1182 | + Returns an error if destination buffer is not large enough, if the source size is not representable |
| 1183 | + with a 4-byte unsigned int, or if the parameter magicVariant is greater than 15 (and therefore invalid). |
| 1184 | + |
| 1185 | + @return : number of bytes written or a ZSTD error. |
| 1186 | + |
| 1187 | +</p></pre><BR> |
| 1188 | + |
1158 | 1189 | <a name="Chapter16"></a><h2>Memory management</h2><pre></pre>
|
1159 | 1190 |
|
1160 | 1191 | <pre><b>size_t ZSTD_estimateCCtxSize(int compressionLevel);
|
@@ -1328,7 +1359,7 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
1328 | 1359 | how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?)
|
1329 | 1360 | </p></pre><BR>
|
1330 | 1361 |
|
1331 |
| -<pre><b>size_t ZSTD_CCtx_getParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value); |
| 1362 | +<pre><b>size_t ZSTD_CCtx_getParameter(const ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value); |
1332 | 1363 | </b><p> Get the requested compression parameter value, selected by enum ZSTD_cParameter,
|
1333 | 1364 | and store it into int* value.
|
1334 | 1365 | @return : 0, or an error code (which can be tested with ZSTD_isError()).
|
@@ -1382,7 +1413,7 @@ <h3>Streaming decompression functions</h3><pre></pre><b><pre></pre></b><BR>
|
1382 | 1413 |
|
1383 | 1414 | </p></pre><BR>
|
1384 | 1415 |
|
1385 |
| -<pre><b>size_t ZSTD_CCtxParams_getParameter(ZSTD_CCtx_params* params, ZSTD_cParameter param, int* value); |
| 1416 | +<pre><b>size_t ZSTD_CCtxParams_getParameter(const ZSTD_CCtx_params* params, ZSTD_cParameter param, int* value); |
1386 | 1417 | </b><p> Similar to ZSTD_CCtx_getParameter.
|
1387 | 1418 | Get the requested value of one compression parameter, selected by enum ZSTD_cParameter.
|
1388 | 1419 | @result : 0, or an error code (which can be tested with ZSTD_isError()).
|
|
0 commit comments