Project Alice
|
#include "../common/zstd_deps.h"
#include "../common/allocations.h"
#include "../common/error_private.h"
#include "../common/zstd_internal.h"
#include "../common/mem.h"
#include "../common/bits.h"
#include "../common/fse.h"
#include "../common/huf.h"
#include "../common/xxhash.h"
#include "zstd_decompress_internal.h"
#include "zstd_ddict.h"
#include "zstd_decompress_block.h"
Go to the source code of this file.
Macros | |
#define | ZSTD_HEAPMODE 1 |
#define | ZSTD_LEGACY_SUPPORT 0 |
#define | ZSTD_MAXWINDOWSIZE_DEFAULT (((U32)1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) + 1) |
#define | ZSTD_NO_FORWARD_PROGRESS_MAX 16 |
#define | FSE_STATIC_LINKING_ONLY |
#define | DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT 4 |
#define | DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT |
#define | DDICT_HASHSET_TABLE_BASE_SIZE 64 |
#define | DDICT_HASHSET_RESIZE_FACTOR 2 |
#define | CHECK_DBOUNDS(p, v) |
Functions | |
size_t | ZSTD_sizeof_DCtx (const ZSTD_DCtx *dctx) |
size_t | ZSTD_estimateDCtxSize (void) |
ZSTD_DCtx * | ZSTD_initStaticDCtx (void *workspace, size_t workspaceSize) |
ZSTD_DCtx * | ZSTD_createDCtx_advanced (ZSTD_customMem customMem) |
ZSTD_DCtx * | ZSTD_createDCtx (void) |
size_t | ZSTD_freeDCtx (ZSTD_DCtx *dctx) |
void | ZSTD_copyDCtx (ZSTD_DCtx *dstDCtx, const ZSTD_DCtx *srcDCtx) |
unsigned | ZSTD_isFrame (const void *buffer, size_t size) |
unsigned | ZSTD_isSkippableFrame (const void *buffer, size_t size) |
size_t | ZSTD_frameHeaderSize (const void *src, size_t srcSize) |
size_t | ZSTD_getFrameHeader_advanced (ZSTD_frameHeader *zfhPtr, const void *src, size_t srcSize, ZSTD_format_e format) |
size_t | ZSTD_getFrameHeader (ZSTD_frameHeader *zfhPtr, const void *src, size_t srcSize) |
unsigned long long | ZSTD_getFrameContentSize (const void *src, size_t srcSize) |
size_t | ZSTD_readSkippableFrame (void *dst, size_t dstCapacity, unsigned *magicVariant, const void *src, size_t srcSize) |
unsigned long long | ZSTD_findDecompressedSize (const void *src, size_t srcSize) |
unsigned long long | ZSTD_getDecompressedSize (const void *src, size_t srcSize) |
size_t | ZSTD_findFrameCompressedSize (const void *src, size_t srcSize) |
unsigned long long | ZSTD_decompressBound (const void *src, size_t srcSize) |
size_t | ZSTD_decompressionMargin (void const *src, size_t srcSize) |
size_t | ZSTD_insertBlock (ZSTD_DCtx *dctx, const void *blockStart, size_t blockSize) |
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) |
size_t | ZSTD_decompressDCtx (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
size_t | ZSTD_decompress (void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
size_t | ZSTD_nextSrcSizeToDecompress (ZSTD_DCtx *dctx) |
ZSTD_nextInputType_e | ZSTD_nextInputType (ZSTD_DCtx *dctx) |
size_t | ZSTD_decompressContinue (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
size_t | ZSTD_loadDEntropy (ZSTD_entropyDTables_t *entropy, const void *const dict, size_t const dictSize) |
size_t | ZSTD_decompressBegin (ZSTD_DCtx *dctx) |
size_t | ZSTD_decompressBegin_usingDict (ZSTD_DCtx *dctx, const void *dict, size_t dictSize) |
size_t | ZSTD_decompressBegin_usingDDict (ZSTD_DCtx *dctx, const ZSTD_DDict *ddict) |
unsigned | ZSTD_getDictID_fromDict (const void *dict, size_t dictSize) |
unsigned | ZSTD_getDictID_fromFrame (const void *src, size_t srcSize) |
size_t | ZSTD_decompress_usingDDict (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_DDict *ddict) |
ZSTD_DStream * | ZSTD_createDStream (void) |
ZSTD_DStream * | ZSTD_initStaticDStream (void *workspace, size_t workspaceSize) |
ZSTD_DStream * | ZSTD_createDStream_advanced (ZSTD_customMem customMem) |
size_t | ZSTD_freeDStream (ZSTD_DStream *zds) |
size_t | ZSTD_DStreamInSize (void) |
size_t | ZSTD_DStreamOutSize (void) |
size_t | ZSTD_DCtx_loadDictionary_advanced (ZSTD_DCtx *dctx, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType) |
size_t | ZSTD_DCtx_loadDictionary_byReference (ZSTD_DCtx *dctx, const void *dict, size_t dictSize) |
size_t | ZSTD_DCtx_loadDictionary (ZSTD_DCtx *dctx, const void *dict, size_t dictSize) |
size_t | ZSTD_DCtx_refPrefix_advanced (ZSTD_DCtx *dctx, const void *prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) |
size_t | ZSTD_DCtx_refPrefix (ZSTD_DCtx *dctx, const void *prefix, size_t prefixSize) |
size_t | ZSTD_initDStream_usingDict (ZSTD_DStream *zds, const void *dict, size_t dictSize) |
size_t | ZSTD_initDStream (ZSTD_DStream *zds) |
size_t | ZSTD_initDStream_usingDDict (ZSTD_DStream *dctx, const ZSTD_DDict *ddict) |
size_t | ZSTD_resetDStream (ZSTD_DStream *dctx) |
size_t | ZSTD_DCtx_refDDict (ZSTD_DCtx *dctx, const ZSTD_DDict *ddict) |
size_t | ZSTD_DCtx_setMaxWindowSize (ZSTD_DCtx *dctx, size_t maxWindowSize) |
size_t | ZSTD_DCtx_setFormat (ZSTD_DCtx *dctx, ZSTD_format_e format) |
ZSTD_bounds | ZSTD_dParam_getBounds (ZSTD_dParameter dParam) |
size_t | ZSTD_DCtx_getParameter (ZSTD_DCtx *dctx, ZSTD_dParameter param, int *value) |
size_t | ZSTD_DCtx_setParameter (ZSTD_DCtx *dctx, ZSTD_dParameter dParam, int value) |
size_t | ZSTD_DCtx_reset (ZSTD_DCtx *dctx, ZSTD_ResetDirective reset) |
size_t | ZSTD_sizeof_DStream (const ZSTD_DStream *dctx) |
size_t | ZSTD_decodingBufferSize_min (unsigned long long windowSize, unsigned long long frameContentSize) |
size_t | ZSTD_estimateDStreamSize (size_t windowSize) |
size_t | ZSTD_estimateDStreamSize_fromFrame (const void *src, size_t srcSize) |
size_t | ZSTD_decompressStream (ZSTD_DStream *zds, ZSTD_outBuffer *output, ZSTD_inBuffer *input) |
size_t | ZSTD_decompressStream_simpleArgs (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, size_t *dstPos, const void *src, size_t srcSize, size_t *srcPos) |
#define CHECK_DBOUNDS | ( | p, | |
v | |||
) |
Definition at line 1867 of file zstd_decompress.c.
#define DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT 4 |
Definition at line 82 of file zstd_decompress.c.
#define DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT |
Definition at line 83 of file zstd_decompress.c.
#define DDICT_HASHSET_RESIZE_FACTOR 2 |
Definition at line 86 of file zstd_decompress.c.
#define DDICT_HASHSET_TABLE_BASE_SIZE 64 |
Definition at line 85 of file zstd_decompress.c.
#define FSE_STATIC_LINKING_ONLY |
Definition at line 64 of file zstd_decompress.c.
#define ZSTD_HEAPMODE 1 |
HEAPMODE : Select how default decompression function ZSTD_decompress() allocates its context, on stack (0), or into heap (1, default; requires malloc()). Note that functions with explicit context such as ZSTD_decompressDCtx() are unaffected.
Definition at line 22 of file zstd_decompress.c.
#define ZSTD_LEGACY_SUPPORT 0 |
LEGACY_SUPPORT : if set to 1+, ZSTD_decompress() can decode older formats (v0.1+)
Definition at line 30 of file zstd_decompress.c.
#define ZSTD_MAXWINDOWSIZE_DEFAULT (((U32)1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) + 1) |
MAXWINDOWSIZE_DEFAULT : maximum window size accepted by DStream by default. Frames requiring more memory will be rejected. It's possible to set a different limit using ZSTD_DCtx_setMaxWindowSize().
Definition at line 40 of file zstd_decompress.c.
#define ZSTD_NO_FORWARD_PROGRESS_MAX 16 |
NO_FORWARD_PROGRESS_MAX : maximum allowed nb of calls to ZSTD_decompressStream() without any forward progress (defined as: no byte read from input, and no byte flushed to output) before triggering an error.
Definition at line 51 of file zstd_decompress.c.
Definition at line 342 of file zstd_decompress.c.
ZSTD_DCtx * ZSTD_createDCtx | ( | void | ) |
Definition at line 306 of file zstd_decompress.c.
ZSTD_DCtx * ZSTD_createDCtx_advanced | ( | ZSTD_customMem | customMem | ) |
Definition at line 301 of file zstd_decompress.c.
ZSTD_DStream * ZSTD_createDStream | ( | void | ) |
Definition at line 1666 of file zstd_decompress.c.
ZSTD_DStream * ZSTD_createDStream_advanced | ( | ZSTD_customMem | customMem | ) |
size_t ZSTD_DCtx_getParameter | ( | ZSTD_DCtx * | dctx, |
ZSTD_dParameter | param, | ||
int * | value | ||
) |
size_t ZSTD_DCtx_loadDictionary | ( | ZSTD_DCtx * | dctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
ZSTD_DCtx_loadDictionary() : Requires v1.4.0+ Create an internal DDict from dict buffer, to be used to decompress all future frames. The dictionary remains valid for all future frames, until explicitly invalidated, or a new dictionary is loaded.
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 1714 of file zstd_decompress.c.
size_t ZSTD_DCtx_loadDictionary_advanced | ( | ZSTD_DCtx * | dctx, |
const void * | dict, | ||
size_t | dictSize, | ||
ZSTD_dictLoadMethod_e | dictLoadMethod, | ||
ZSTD_dictContentType_e | dictContentType | ||
) |
size_t ZSTD_DCtx_loadDictionary_byReference | ( | ZSTD_DCtx * | dctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
Definition at line 1709 of file zstd_decompress.c.
size_t ZSTD_DCtx_refDDict | ( | ZSTD_DCtx * | dctx, |
const ZSTD_DDict * | ddict | ||
) |
ZSTD_DCtx_refDDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used to decompress next frames. The dictionary remains active for decompression of future frames using same DCtx.
If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function will store the DDict references in a table, and the DDict used for decompression will be determined at decompression time, as per the dict ID in the frame. The memory for the table is allocated on the first call to refDDict, and can be freed with ZSTD_freeDCtx().
If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary will be managed, and referencing a dictionary effectively "discards" any previous one.
Definition at line 1774 of file zstd_decompress.c.
size_t ZSTD_DCtx_refPrefix | ( | ZSTD_DCtx * | dctx, |
const void * | prefix, | ||
size_t | prefixSize | ||
) |
ZSTD_DCtx_refPrefix() : Requires v1.4.0+ 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 1726 of file zstd_decompress.c.
size_t ZSTD_DCtx_refPrefix_advanced | ( | ZSTD_DCtx * | dctx, |
const void * | prefix, | ||
size_t | prefixSize, | ||
ZSTD_dictContentType_e | dictContentType | ||
) |
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 1941 of file zstd_decompress.c.
size_t ZSTD_DCtx_setFormat | ( | ZSTD_DCtx * | dctx, |
ZSTD_format_e | format | ||
) |
Definition at line 1810 of file zstd_decompress.c.
size_t ZSTD_DCtx_setMaxWindowSize | ( | ZSTD_DCtx * | dctx, |
size_t | maxWindowSize | ||
) |
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 1900 of file zstd_decompress.c.
size_t ZSTD_decodingBufferSize_min | ( | unsigned long long | windowSize, |
unsigned long long | frameContentSize | ||
) |
Definition at line 1982 of file zstd_decompress.c.
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 1197 of file zstd_decompress.c.
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 pre-digested Dictionary Use dictionary without significant overhead.
Definition at line 1650 of file zstd_decompress.c.
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 1165 of file zstd_decompress.c.
size_t ZSTD_decompressBegin | ( | ZSTD_DCtx * | dctx | ) |
size_t ZSTD_decompressBegin_usingDDict | ( | ZSTD_DCtx * | dctx, |
const ZSTD_DDict * | ddict | ||
) |
size_t ZSTD_decompressBegin_usingDict | ( | ZSTD_DCtx * | dctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
Definition at line 1582 of file zstd_decompress.c.
unsigned long long ZSTD_decompressBound | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_decompressBound() : compatible with legacy mode src
must point to the start of a ZSTD frame or a skippeable frame srcSize
must be at least as large as the frame contained
Definition at line 814 of file zstd_decompress.c.
size_t ZSTD_decompressContinue | ( | ZSTD_DCtx * | dctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
ZSTD_decompressContinue() : srcSize : must be the exact nb of bytes expected (see ZSTD_nextSrcSizeToDecompress())
dst
(necessarily <= `dstCapacity) or an error code, which can be tested using ZSTD_isError() Definition at line 1269 of file zstd_decompress.c.
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 (see below).
Definition at line 1191 of file zstd_decompress.c.
size_t ZSTD_decompressionMargin | ( | void const * | src, |
size_t | srcSize | ||
) |
Definition at line 832 of file zstd_decompress.c.
size_t ZSTD_decompressStream | ( | ZSTD_DStream * | zds, |
ZSTD_outBuffer * | output, | ||
ZSTD_inBuffer * | input | ||
) |
ZSTD_decompressStream() : Streaming decompression function. Call repetitively to consume full input updating it as necessary. Function will update both input and output pos
fields exposing current state via these fields:
input.pos < input.size
, some input remaining and caller should provide remaining input on the next call.output.pos < output.size
, decoder finished and flushed all remaining buffers.output.pos == output.size
, potentially uncflushed data present in the internal buffers, call ZSTD_decompressStream() again to flush remaining data to output. Note : with no additional input, amount of data flushed <= ZSTD_BLOCKSIZE_MAX.Note: when an operation returns with an error code, the @zds state may be left in undefined state. It's UB to invoke ZSTD_decompressStream()
on such a state. In order to re-use such a state, it must be first reset, which can be done explicitly (ZSTD_DCtx_reset()
), or is implied for operations starting some new decompression job (ZSTD_initDStream
, ZSTD_decompressDCtx()
, ZSTD_decompress_usingDict()
)
Definition at line 2080 of file zstd_decompress.c.
size_t ZSTD_decompressStream_simpleArgs | ( | ZSTD_DCtx * | dctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
size_t * | dstPos, | ||
const void * | src, | ||
size_t | srcSize, | ||
size_t * | srcPos | ||
) |
Definition at line 2385 of file zstd_decompress.c.
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 1815 of file zstd_decompress.c.
size_t ZSTD_DStreamInSize | ( | void | ) |
recommended size for input buffer
Definition at line 1690 of file zstd_decompress.c.
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 1691 of file zstd_decompress.c.
size_t ZSTD_estimateDCtxSize | ( | void | ) |
Definition at line 225 of file zstd_decompress.c.
size_t ZSTD_estimateDStreamSize | ( | size_t | windowSize | ) |
Definition at line 1987 of file zstd_decompress.c.
size_t ZSTD_estimateDStreamSize_fromFrame | ( | const void * | src, |
size_t | srcSize | ||
) |
Definition at line 1995 of file zstd_decompress.c.
unsigned long long ZSTD_findDecompressedSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_findDecompressedSize() : srcSize
must be the exact length of some number of ZSTD compressed and/or skippable frames note: compatible with legacy mode
Definition at line 637 of file zstd_decompress.c.
size_t ZSTD_findFrameCompressedSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_findFrameCompressedSize() : See docs in zstd.h Note: compatible with legacy mode
Definition at line 803 of file zstd_decompress.c.
size_t ZSTD_frameHeaderSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_frameHeaderSize() : srcSize must be >= ZSTD_frameHeaderSize_prefix.
Definition at line 431 of file zstd_decompress.c.
size_t ZSTD_freeDCtx | ( | ZSTD_DCtx * | dctx | ) |
Definition at line 320 of file zstd_decompress.c.
size_t ZSTD_freeDStream | ( | ZSTD_DStream * | zds | ) |
Definition at line 1682 of file zstd_decompress.c.
unsigned long long ZSTD_getDecompressedSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_getDecompressedSize() : compatible with legacy mode
srcSize
too small) Definition at line 684 of file zstd_decompress.c.
unsigned ZSTD_getDictID_fromDict | ( | const void * | dict, |
size_t | dictSize | ||
) |
ZSTD_getDictID_fromDict() : Provides the dictID stored within dictionary. if
Definition at line 1618 of file zstd_decompress.c.
unsigned ZSTD_getDictID_fromFrame | ( | const void * | src, |
size_t | srcSize | ||
) |
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 1638 of file zstd_decompress.c.
unsigned long long ZSTD_getFrameContentSize | ( | const void * | src, |
size_t | srcSize | ||
) |
ZSTD_getFrameContentSize() : compatible with legacy mode
src
if known, otherwiseDefinition at line 563 of file zstd_decompress.c.
size_t ZSTD_getFrameHeader | ( | ZSTD_frameHeader * | zfhPtr, |
const void * | src, | ||
size_t | srcSize | ||
) |
ZSTD_getFrameHeader() : decode Frame Header, or require larger srcSize
. note : this function does not consume input, it only reads it.
zfhPtr
is correctly filled, >0, srcSize
is too small, value is wanted srcSize
amount, or an error code, which can be tested using ZSTD_isError() Definition at line 553 of file zstd_decompress.c.
size_t ZSTD_getFrameHeader_advanced | ( | ZSTD_frameHeader * | zfhPtr, |
const void * | src, | ||
size_t | srcSize, | ||
ZSTD_format_e | format | ||
) |
ZSTD_getFrameHeader_advanced() : decode Frame Header, or require larger srcSize
. note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless
zfhPtr
is correctly filled, >0, srcSize
is too small, value is wanted srcSize
amount, or an error code, which can be tested using ZSTD_isError() Definition at line 443 of file zstd_decompress.c.
size_t ZSTD_initDStream | ( | ZSTD_DStream * | zds | ) |
ZSTD_initDStream() : Initialize/reset DStream state for new decompression operation. Call before new decompression operation using same DStream.
Note : This function is redundant with the advanced API and equivalent to: ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); ZSTD_DCtx_refDDict(zds, NULL);
Definition at line 1744 of file zstd_decompress.c.
size_t ZSTD_initDStream_usingDDict | ( | ZSTD_DStream * | dctx, |
const ZSTD_DDict * | ddict | ||
) |
size_t ZSTD_initDStream_usingDict | ( | ZSTD_DStream * | zds, |
const void * | dict, | ||
size_t | dictSize | ||
) |
ZSTD_DCtx * ZSTD_initStaticDCtx | ( | void * | workspace, |
size_t | workspaceSize | ||
) |
ZSTD_DStream * ZSTD_initStaticDStream | ( | void * | workspace, |
size_t | workspaceSize | ||
) |
Definition at line 1672 of file zstd_decompress.c.
size_t ZSTD_insertBlock | ( | ZSTD_DCtx * | dctx, |
const void * | blockStart, | ||
size_t | blockSize | ||
) |
ZSTD_insertBlock() : insert src
block into dctx
history. Useful to track uncompressed blocks.
Definition at line 881 of file zstd_decompress.c.
unsigned ZSTD_isFrame | ( | const void * | buffer, |
size_t | size | ||
) |
ZSTD_isFrame() : Tells if the content of buffer
starts with a valid Frame Identifier. Note : Frame Identifier is 4 bytes. If size < 4
,
Definition at line 381 of file zstd_decompress.c.
unsigned ZSTD_isSkippableFrame | ( | const void * | buffer, |
size_t | size | ||
) |
ZSTD_isSkippableFrame() : Tells if the content of buffer
starts with a valid Frame Identifier for a skippable frame. Note : Frame Identifier is 4 bytes. If size < 4
,
Definition at line 398 of file zstd_decompress.c.
size_t ZSTD_loadDEntropy | ( | ZSTD_entropyDTables_t * | entropy, |
const void *const | dict, | ||
size_t const | dictSize | ||
) |
ZSTD_loadDEntropy() : dict : must point at beginning of a valid zstd dictionary.
Definition at line 1446 of file zstd_decompress.c.
ZSTD_nextInputType_e ZSTD_nextInputType | ( | ZSTD_DCtx * | dctx | ) |
Definition at line 1238 of file zstd_decompress.c.
size_t ZSTD_nextSrcSizeToDecompress | ( | ZSTD_DCtx * | dctx | ) |
Definition at line 1218 of file zstd_decompress.c.
size_t ZSTD_readSkippableFrame | ( | void * | dst, |
size_t | dstCapacity, | ||
unsigned * | magicVariant, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
ZSTD_readSkippableFrame() : Retrieves content of a skippable frame, and writes it to dst buffer.
The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested in the magicVariant.
Returns an error if destination buffer is not large enough, or if this is not a valid skippable frame.
Definition at line 608 of file zstd_decompress.c.
size_t ZSTD_resetDStream | ( | ZSTD_DStream * | dctx | ) |
size_t ZSTD_sizeof_DCtx | ( | const ZSTD_DCtx * | dctx | ) |
Definition at line 217 of file zstd_decompress.c.
size_t ZSTD_sizeof_DStream | ( | const ZSTD_DStream * | dctx | ) |
Definition at line 1959 of file zstd_decompress.c.