ReactOS 0.4.16-dev-319-g6cf4263
|
#include <limits.h>
#include <stddef.h>
Go to the source code of this file.
Classes | |
struct | ZSTD_bounds |
struct | ZSTD_inBuffer_s |
struct | ZSTD_outBuffer_s |
Typedefs | |
typedef struct ZSTD_CCtx_s | ZSTD_CCtx |
typedef struct ZSTD_DCtx_s | ZSTD_DCtx |
typedef struct ZSTD_inBuffer_s | ZSTD_inBuffer |
typedef struct ZSTD_outBuffer_s | ZSTD_outBuffer |
typedef ZSTD_CCtx | ZSTD_CStream |
typedef ZSTD_DCtx | ZSTD_DStream |
typedef struct ZSTD_CDict_s | ZSTD_CDict |
typedef struct ZSTD_DDict_s | ZSTD_DDict |
#define ZSTD_BLOCKSIZE_MAX (1<<ZSTD_BLOCKSIZELOG_MAX) |
#define ZSTD_CONTENTSIZE_UNKNOWN (0ULL - 1) |
ZSTD_getFrameContentSize() : requires v1.3.0+ src
should point to the start of a ZSTD encoded frame. srcSize
must be at least as large as the frame header. hint : any size >= ZSTD_frameHeaderSize_max
is large enough.
src
frame content, if knownreturn==ZSTD_CONTENTSIZE_UNKNOWN
, data to decompress could be any size. In which case, it's necessary to use streaming mode to decompress data. Optionally, application can rely on some implicit limit, as ZSTD_decompress() only needs an upper bound of decompressed size. (For example, data could be necessarily cut into blocks <= 16 KB). note 3 : decompressed size is always present when compression is completed using single-pass functions, such as ZSTD_compress(), ZSTD_compressCCtx() ZSTD_compress_usingDict() or ZSTD_compress_usingCDict(). note 4 : decompressed size can be very large (64-bits value), potentially larger than what local system can handle as a single memory segment. In which case, it's necessary to use streaming mode to decompress data. note 5 : If source is untrusted, decompressed size could be wrong or intentionally modified. Always ensure return value fits within application's authorized limits. Each application can set its own limits. note 6 : This function replaces ZSTD_getDecompressedSize() #define ZSTD_LIB_VERSION ZSTD_VERSION_MAJOR.ZSTD_VERSION_MINOR.ZSTD_VERSION_RELEASE |
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) |
#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION) |
#define ZSTDLIB_API ZSTDLIB_VISIBILITY |
typedef struct ZSTD_CCtx_s ZSTD_CCtx |
typedef struct ZSTD_CDict_s ZSTD_CDict |
typedef ZSTD_CCtx ZSTD_CStream |
typedef struct ZSTD_DCtx_s ZSTD_DCtx |
typedef struct ZSTD_DDict_s ZSTD_DDict |
typedef ZSTD_DCtx ZSTD_DStream |
typedef struct ZSTD_inBuffer_s ZSTD_inBuffer |
typedef struct ZSTD_outBuffer_s ZSTD_outBuffer |
Definition at line 265 of file zstd.h.
Enumerator | |
---|---|
ZSTD_d_windowLogMax | |
ZSTD_d_experimentalParam1 | |
ZSTD_d_experimentalParam2 |
Definition at line 513 of file zstd.h.
Enumerator | |
---|---|
ZSTD_e_continue | |
ZSTD_e_flush | |
ZSTD_e_end |
Definition at line 648 of file zstd.h.
Enumerator | |
---|---|
ZSTD_reset_session_only | |
ZSTD_reset_parameters | |
ZSTD_reset_session_and_parameters |
Enumerator | |
---|---|
ZSTD_fast | |
ZSTD_dfast | |
ZSTD_greedy | |
ZSTD_lazy | |
ZSTD_lazy2 | |
ZSTD_btlazy2 | |
ZSTD_btopt | |
ZSTD_btultra | |
ZSTD_btultra2 |
Definition at line 251 of file zstd.h.
ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary | ( | ZSTD_CCtx * | cctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
ZSTD_CCtx_loadDictionary() : Create an internal CDict from dict
buffer. Decompression will have to use same dictionary.
dict
content will be copied internally. Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. In such a case, dictionary buffer must outlive its users. Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() to precisely select how dictionary content must be interpreted. Definition at line 924 of file zstd_compress.c.
Referenced by ZSTD_initCStream_advanced(), ZSTD_initCStream_internal(), and ZSTD_initCStream_usingDict().
ZSTDLIB_API size_t ZSTD_CCtx_refCDict | ( | ZSTD_CCtx * | cctx, |
const ZSTD_CDict * | cdict | ||
) |
ZSTD_CCtx_refCDict() : Reference a prepared dictionary, to be used for all next compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx.
Definition at line 931 of file zstd_compress.c.
Referenced by ZSTD_initCStream(), ZSTD_initCStream_internal(), ZSTD_initCStream_srcSize(), ZSTD_initCStream_usingCDict(), and ZSTD_initCStream_usingCDict_advanced().
ZSTD_CCtx_refPrefix() : Reference a prefix (single-usage dictionary) for next compressed frame. A prefix is only used once. Tables are discarded at end of frame (ZSTD_e_end). Decompression will need same prefix to properly regenerate data. Compressing with a prefix is similar in outcome as performing a diff and compressing it, but performs much faster, especially during decompression (compression speed is tunable with compression level).
Definition at line 941 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_CCtx_reset | ( | ZSTD_CCtx * | cctx, |
ZSTD_ResetDirective | reset | ||
) |
ZSTD_CCtx_reset() : There are 2 different things that can be reset, independently or jointly :
ZSTD_CCtx_reset() : Also dumps dictionary
Definition at line 962 of file zstd_compress.c.
Referenced by ZSTD_compress2(), ZSTD_compressStream2(), ZSTD_compressStream_generic(), ZSTD_initCCtx(), ZSTD_initCStream(), ZSTD_initCStream_advanced(), ZSTD_initCStream_internal(), ZSTD_initCStream_srcSize(), ZSTD_initCStream_usingCDict(), ZSTD_initCStream_usingCDict_advanced(), ZSTD_initCStream_usingDict(), and ZSTD_resetCStream().
ZSTDLIB_API size_t ZSTD_CCtx_setParameter | ( | ZSTD_CCtx * | cctx, |
ZSTD_cParameter | param, | ||
int | value | ||
) |
ZSTD_CCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_cParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is generally only possible during frame initialization (before starting compression). Exception : when using multi-threading mode (nbWorkers >= 1), the following parameters can be updated during compression (within same frame): => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. new parameters will be active for next job only (after a flush()).
Definition at line 482 of file zstd_compress.c.
Referenced by ZSTD_initCStream(), ZSTD_initCStream_srcSize(), and ZSTD_initCStream_usingDict().
ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize | ( | ZSTD_CCtx * | cctx, |
unsigned long long | pledgedSrcSize | ||
) |
ZSTD_CCtx_setPledgedSrcSize() : Total input data size to be compressed as a single frame. Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. This value will also be controlled at end of frame, and trigger an error if not respected.
Definition at line 844 of file zstd_compress.c.
Referenced by ZSTD_initCStream_advanced(), ZSTD_initCStream_internal(), ZSTD_initCStream_srcSize(), ZSTD_initCStream_usingCDict_advanced(), and ZSTD_resetCStream().
ZSTDLIB_API size_t ZSTD_compress | ( | void * | dst, |
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
int | compressionLevel | ||
) |
ZSTD_compress() : Compresses src
content as a single zstd compressed frame into already allocated dst
. Hint : compression runs faster if dstCapacity
>= ZSTD_compressBound(srcSize)
.
dst
(<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()). Definition at line 3307 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_compress2 | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
ZSTD_compress2() : Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. ZSTD_compress2() always starts a new frame. Should cctx hold data from a previously unfinished frame, everything about it is forgotten.
dstCapacity
>= ZSTD_compressBound(srcSize)
. dst
(<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()). Definition at line 4064 of file zstd_compress.c.
Referenced by ZSTD_getSequences().
ZSTDLIB_API size_t ZSTD_compress_usingCDict | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
const ZSTD_CDict * | cdict | ||
) |
ZSTD_compress_usingCDict() : Compression using a digested Dictionary. Recommended when same dictionary is used multiple times. Note : compression level is decided at dictionary creation time, and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)
ZSTD_compress_usingCDict() : Compression using a digested Dictionary. Faster startup than ZSTD_compress_usingDict(), recommended when same dictionary is used multiple times. Note that compression parameters are decided at CDict creation time while frame parameters are hardcoded
Definition at line 3596 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_compress_usingDict | ( | ZSTD_CCtx * | ctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
const void * | dict, | ||
size_t | dictSize, | ||
int | compressionLevel | ||
) |
ZSTD_compress_usingDict() : Compression at an explicit compression level using a Dictionary. A dictionary can be any arbitrary data segment (also called a prefix), or a buffer with specified information (see dictBuilder/zdict.h). Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note 2 : When dict == NULL || dictSize < 8
no dictionary is used.
Definition at line 3284 of file zstd_compress.c.
Referenced by ZSTD_compressCCtx().
ZSTDLIB_API size_t ZSTD_compressBound | ( | size_t | srcSize | ) |
maximum compressed size in worst case single-pass scenario
Definition at line 44 of file zstd_compress.c.
Referenced by ZSTD_compressStream_generic(), ZSTD_CStreamOutSize(), ZSTD_estimateCStreamSize_usingCCtxParams(), ZSTD_getSequences(), and ZSTD_resetCCtx_internal().
ZSTDLIB_API size_t ZSTD_compressCCtx | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
int | compressionLevel | ||
) |
ZSTD_compressCCtx() : Same as ZSTD_compress(), using an explicit ZSTD_CCtx. Important : in order to behave similarly to ZSTD_compress()
, this function compresses at requested compression level, ignoring any other parameter . If any advanced parameter was set using the advanced API, they will all be reset. Only compressionLevel
remains.
Definition at line 3297 of file zstd_compress.c.
Referenced by ZSTD_compress().
ZSTDLIB_API size_t ZSTD_compressStream | ( | ZSTD_CStream * | zcs, |
ZSTD_outBuffer * | output, | ||
ZSTD_inBuffer * | input | ||
) |
Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue). NOTE: The return value is different. ZSTD_compressStream() returns a hint for the next read size (if non-zero and not an error). ZSTD_compressStream2() returns the minimum nb of bytes left to flush (if non-zero and not an error).
Definition at line 3956 of file zstd_compress.c.
Referenced by zstd_compress().
ZSTDLIB_API size_t ZSTD_compressStream2 | ( | ZSTD_CCtx * | cctx, |
ZSTD_outBuffer * | output, | ||
ZSTD_inBuffer * | input, | ||
ZSTD_EndDirective | endOp | ||
) |
ZSTD_compressStream2() : Behaves about the same as ZSTD_compressStream, with additional control on end directive.
Definition at line 3963 of file zstd_compress.c.
Referenced by ZSTD_compressStream(), ZSTD_compressStream2_simpleArgs(), ZSTD_endStream(), and ZSTD_flushStream().
ZSTDLIB_API ZSTD_bounds ZSTD_cParam_getBounds | ( | ZSTD_cParameter | cParam | ) |
ZSTD_cParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped.
Definition at line 268 of file zstd_compress.c.
Referenced by ZSTD_cParam_clampBounds().
ZSTDLIB_API ZSTD_CCtx * ZSTD_createCCtx | ( | void | ) |
Definition at line 64 of file zstd_compress.c.
ZSTDLIB_API ZSTD_CDict * ZSTD_createCDict | ( | const void * | dictBuffer, |
size_t | dictSize, | ||
int | compressionLevel | ||
) |
ZSTD_createCDict() : When compressing multiple messages or blocks using the same dictionary, it's recommended to digest the dictionary only once, since it's a costly operation. ZSTD_createCDict() will create a state from digesting a dictionary. The resulting state can be used for future compression operations with very limited startup cost. ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. Note 1 : Consider experimental function ZSTD_createCDict_byReference()
if you prefer to not duplicate @dictBuffer content. Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, in which case the only thing that it transports is the @compressionLevel. This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, expecting a ZSTD_CDict parameter with any data, including those without a known dictionary.
Definition at line 3447 of file zstd_compress.c.
ZSTDLIB_API ZSTD_CStream * ZSTD_createCStream | ( | void | ) |
Definition at line 3611 of file zstd_compress.c.
ZSTDLIB_API ZSTD_DCtx * ZSTD_createDCtx | ( | void | ) |
Definition at line 147 of file zstd_decompress.c.
Referenced by ZSTD_decompress().
ZSTDLIB_API ZSTD_DDict * ZSTD_createDDict | ( | const void * | dict, |
size_t | dictSize | ||
) |
ZSTD_createDDict() : Create a digested dictionary, ready to start decompression operation without startup delay. dictBuffer can be released after DDict creation, as its content is copied inside DDict.
ZSTD_createDDict() : Create a digested dictionary, to start decompression without startup delay. dict
content is copied inside DDict. Consequently, dict
can be released after ZSTD_DDict
creation
Definition at line 170 of file zstd_ddict.c.
ZSTDLIB_API ZSTD_DStream * ZSTD_createDStream | ( | void | ) |
Definition at line 1265 of file zstd_decompress.c.
ZSTDLIB_API size_t ZSTD_CStreamInSize | ( | void | ) |
ZSTDLIB_API size_t ZSTD_CStreamOutSize | ( | void | ) |
recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block.
Definition at line 3638 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary | ( | ZSTD_DCtx * | dctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
ZSTD_DCtx_loadDictionary() : Create an internal DDict from dict buffer, to be used to decompress next frames. The dictionary remains valid for all future frames, until explicitly invalidated.
dict
content will be copied internally, so dict
can be released after loading. Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead. Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of how dictionary content is loaded and interpreted. Definition at line 1313 of file zstd_decompress.c.
Referenced by ZSTD_initDStream_usingDict().
ZSTDLIB_API size_t ZSTD_DCtx_refDDict | ( | ZSTD_DCtx * | dctx, |
const ZSTD_DDict * | ddict | ||
) |
ZSTD_DCtx_refDDict() : Reference a prepared dictionary, to be used to decompress next frames. The dictionary remains active for decompression of future frames using same DCtx.
Definition at line 1369 of file zstd_decompress.c.
Referenced by ZSTD_initDStream_usingDDict().
ZSTD_DCtx_refPrefix() : Reference a prefix (single-usage dictionary) to decompress next frame. This is the reverse operation of ZSTD_CCtx_refPrefix(), and must use the same prefix as the one used during compression. Prefix is only used once. Reference is discarded at end of frame. End of frame is reached when ZSTD_decompressStream() returns 0.
Definition at line 1325 of file zstd_decompress.c.
ZSTDLIB_API size_t ZSTD_DCtx_reset | ( | ZSTD_DCtx * | dctx, |
ZSTD_ResetDirective | reset | ||
) |
ZSTD_DCtx_reset() : Return a DCtx to clean state. Session and parameters can be reset jointly or separately. Parameters can only be reset when no active frame is being decompressed.
Definition at line 1461 of file zstd_decompress.c.
Referenced by ZSTD_initDStream_usingDDict(), ZSTD_initDStream_usingDict(), and ZSTD_resetDStream().
ZSTDLIB_API size_t ZSTD_DCtx_setParameter | ( | ZSTD_DCtx * | dctx, |
ZSTD_dParameter | param, | ||
int | value | ||
) |
ZSTD_DCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_dParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is only possible during frame initialization (before starting decompression).
Definition at line 1439 of file zstd_decompress.c.
Referenced by ZSTD_DCtx_setFormat().
ZSTDLIB_API size_t ZSTD_decompress | ( | void * | dst, |
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | compressedSize | ||
) |
ZSTD_decompress() : compressedSize
: must be the exact size of some number of compressed and/or skippable frames. dstCapacity
is an upper bound of originalSize to regenerate. If user cannot imply a maximum upper bound, it's better to use streaming mode to decompress data.
dst
(<= dstCapacity
), or an errorCode if it fails (which can be tested using ZSTD_isError()). Definition at line 819 of file zstd_decompress.c.
ZSTDLIB_API size_t ZSTD_decompress_usingDDict | ( | ZSTD_DCtx * | dctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
const ZSTD_DDict * | ddict | ||
) |
ZSTD_decompress_usingDDict() : Decompression using a digested Dictionary. Recommended when same dictionary is used multiple times.
ZSTD_decompress_usingDDict() : Decompression using a pre-digested Dictionary Use dictionary without significant overhead.
Definition at line 1249 of file zstd_decompress.c.
Referenced by ZSTD_decompressDCtx(), and ZSTD_decompressStream().
ZSTDLIB_API size_t ZSTD_decompress_usingDict | ( | ZSTD_DCtx * | dctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
const void * | dict, | ||
size_t | dictSize | ||
) |
ZSTD_decompress_usingDict() : Decompression using a known Dictionary. Dictionary must be identical to the one used during compression. Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note : When dict == NULL || dictSize < 8
no dictionary is used.
Definition at line 787 of file zstd_decompress.c.
ZSTDLIB_API size_t ZSTD_decompressDCtx | ( | ZSTD_DCtx * | dctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
ZSTD_decompressDCtx() : Same as ZSTD_decompress(), requires an allocated ZSTD_DCtx. Compatible with sticky parameters.
Definition at line 813 of file zstd_decompress.c.
Referenced by ZSTD_decompress().
ZSTDLIB_API size_t ZSTD_decompressStream | ( | ZSTD_DStream * | zds, |
ZSTD_outBuffer * | output, | ||
ZSTD_inBuffer * | input | ||
) |
Definition at line 1588 of file zstd_decompress.c.
Referenced by zstd_decompress(), and ZSTD_decompressStream_simpleArgs().
ZSTDLIB_API ZSTD_bounds ZSTD_dParam_getBounds | ( | ZSTD_dParameter | dParam | ) |
ZSTD_dParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped.
Definition at line 1400 of file zstd_decompress.c.
Referenced by ZSTD_DCtx_setMaxWindowSize(), and ZSTD_dParam_withinBounds().
ZSTDLIB_API size_t ZSTD_DStreamInSize | ( | void | ) |
ZSTDLIB_API size_t ZSTD_DStreamOutSize | ( | void | ) |
recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances.
Definition at line 1290 of file zstd_decompress.c.
ZSTDLIB_API size_t ZSTD_endStream | ( | ZSTD_CStream * | zcs, |
ZSTD_outBuffer * | output | ||
) |
Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).
Definition at line 4097 of file zstd_compress.c.
Referenced by zstd_compress().
ZSTDLIB_API size_t ZSTD_findFrameCompressedSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_findFrameCompressedSize() : src
should point to the start of a ZSTD frame or skippable frame. srcSize
must be >= first frame size
src
, suitable to pass as srcSize
to ZSTD_decompress
or similar, or an error code if input is invalidZSTD_findFrameCompressedSize() : compatible with legacy mode src
must point to the start of a ZSTD frame, ZSTD legacy frame, or skippable frame srcSize
must be at least as large as the frame contained
src
Definition at line 532 of file zstd_decompress.c.
Referenced by ZSTD_decompressStream(), and ZSTD_findDecompressedSize().
ZSTDLIB_API size_t ZSTD_flushStream | ( | ZSTD_CStream * | zcs, |
ZSTD_outBuffer * | output | ||
) |
Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush).
Definition at line 4090 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_freeCCtx | ( | ZSTD_CCtx * | cctx | ) |
Definition at line 147 of file zstd_compress.c.
Referenced by ZSTD_freeCStream().
ZSTDLIB_API size_t ZSTD_freeCDict | ( | ZSTD_CDict * | CDict | ) |
ZSTD_freeCDict() : Function frees memory allocated by ZSTD_createCDict().
Definition at line 3466 of file zstd_compress.c.
Referenced by ZSTD_clearAllDicts(), and ZSTD_createCDict_advanced().
ZSTDLIB_API size_t ZSTD_freeCStream | ( | ZSTD_CStream * | zcs | ) |
ZSTDLIB_API size_t ZSTD_freeDCtx | ( | ZSTD_DCtx * | dctx | ) |
Definition at line 161 of file zstd_decompress.c.
Referenced by ZSTD_decompress(), and ZSTD_freeDStream().
ZSTDLIB_API size_t ZSTD_freeDDict | ( | ZSTD_DDict * | ddict | ) |
ZSTD_freeDDict() : Function frees memory allocated with ZSTD_createDDict()
Definition at line 212 of file zstd_ddict.c.
Referenced by ZSTD_clearDict(), and ZSTD_createDDict_advanced().
ZSTDLIB_API size_t ZSTD_freeDStream | ( | ZSTD_DStream * | zds | ) |
Definition at line 1281 of file zstd_decompress.c.
Referenced by zstd_decompress().
ZSTD_getDecompressedSize() : NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize(). Both functions work the same way, but ZSTD_getDecompressedSize() blends "empty", "unknown" and "error" results to the same return value (0), while ZSTD_getFrameContentSize() gives them separate return values.
src
frame content if known and not empty, 0 otherwise.ZSTD_getDecompressedSize() : compatible with legacy mode
srcSize
too small) Definition at line 426 of file zstd_decompress.c.
ZSTDLIB_API unsigned ZSTD_getDictID_fromDDict | ( | const ZSTD_DDict * | ddict | ) |
ZSTD_getDictID_fromDDict() : Provides the dictID of the dictionary loaded into ddict
. If
Definition at line 240 of file zstd_ddict.c.
ZSTDLIB_API unsigned ZSTD_getDictID_fromDict | ( | const void * | dict, |
size_t | dictSize | ||
) |
ZSTD_getDictID_fromDict() : Provides the dictID stored within dictionary. if
Definition at line 1217 of file zstd_decompress.c.
Referenced by ZSTD_getDictID_fromDDict().
ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_getDictID_fromFrame() : Provides the dictID required to decompressed the frame stored within src
. If
srcSize
is too small, and as a result, the frame header could not be decoded (only possible if srcSize < ZSTD_FRAMEHEADERSIZE_MAX
).ZSTD_getDictID_fromFrame() : Provides the dictID required to decompress frame stored within src
. If
srcSize
is too small, and as a result, frame header could not be decoded. Note : possible if srcSize < ZSTD_FRAMEHEADERSIZE_MAX
.Definition at line 1237 of file zstd_decompress.c.
ZSTDLIB_API const char * ZSTD_getErrorName | ( | size_t | code | ) |
provides readable string from an error code
ZSTD_getErrorName() : provides error code string from function result (useful for debugging)
Definition at line 41 of file zstd_common.c.
Referenced by zstd_compress(), ZSTD_compressSubBlock_literal(), and zstd_decompress().
ZSTD_getFrameContentSize() : compatible with legacy mode
src
if known, otherwiseDefinition at line 337 of file zstd_decompress.c.
Referenced by ZSTD_findDecompressedSize(), and ZSTD_getDecompressedSize().
ZSTDLIB_API size_t ZSTD_initCStream | ( | ZSTD_CStream * | zcs, |
int | compressionLevel | ||
) |
Equivalent to:
ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel);
Definition at line 3781 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_initDStream | ( | ZSTD_DStream * | zds | ) |
Definition at line 1343 of file zstd_decompress.c.
Referenced by zstd_decompress().
ZSTDLIB_API unsigned ZSTD_isError | ( | size_t | code | ) |
tells if a size_t
function result is an error code
ZSTD_isError() : tells if a return value is an error code symbol is required for external callers
Definition at line 37 of file zstd_common.c.
ZSTDLIB_API int ZSTD_maxCLevel | ( | void | ) |
maximum compression level available
Definition at line 4116 of file zstd_compress.c.
Referenced by registry_load_volume_options(), and ZSTD_cParam_getBounds().
ZSTDLIB_API int ZSTD_minCLevel | ( | void | ) |
minimum negative compression level allowed
Definition at line 4117 of file zstd_compress.c.
Referenced by ZSTD_cParam_getBounds().
ZSTDLIB_API size_t ZSTD_sizeof_CCtx | ( | const ZSTD_CCtx * | cctx | ) |
ZSTD_sizeof_*() : These functions give the current memory usage of selected object. Note that object memory usage can evolve (increase or decrease) over time.
Definition at line 174 of file zstd_compress.c.
Referenced by ZSTD_sizeof_CStream().
ZSTDLIB_API size_t ZSTD_sizeof_CDict | ( | const ZSTD_CDict * | cdict | ) |
Definition at line 3342 of file zstd_compress.c.
Referenced by ZSTD_sizeof_localDict().
ZSTDLIB_API size_t ZSTD_sizeof_CStream | ( | const ZSTD_CStream * | zcs | ) |
Definition at line 184 of file zstd_compress.c.
ZSTDLIB_API size_t ZSTD_sizeof_DCtx | ( | const ZSTD_DCtx * | dctx | ) |
Definition at line 78 of file zstd_decompress.c.
Referenced by ZSTD_sizeof_DStream().
ZSTDLIB_API size_t ZSTD_sizeof_DDict | ( | const ZSTD_DDict * | ddict | ) |
ZSTDLIB_API size_t ZSTD_sizeof_DStream | ( | const ZSTD_DStream * | zds | ) |
Definition at line 1479 of file zstd_decompress.c.
ZSTDLIB_API unsigned ZSTD_versionNumber | ( | void | ) |
ZSTDLIB_API const char * ZSTD_versionString | ( | void | ) |
Definition at line 27 of file zstd_common.c.