Crate zstd_sys [−] [src]
Structs
Enums
Constants
Statics
ZSTD_defaultCMem |
Functions
ZDICT_getDictID⚠ | |
ZDICT_getErrorName⚠ | |
ZDICT_isError⚠ | |
ZDICT_trainFromBuffer⚠ |
ZDICT_trainFromBuffer():
Train a dictionary from an array of samples.
Uses ZDICT_optimizeTrainFromBuffer_cover() single-threaded, with d=8 and steps=4.
Samples must be stored concatenated in a single flat buffer |
ZSTDMT_CCtxParam_setMTCtxParameter⚠ | |
ZSTDMT_compressCCtx⚠ | |
ZSTDMT_compressStream⚠ | |
ZSTDMT_compressStream_generic⚠ |
ZSTDMT_compressStream_generic() : Combines ZSTDMT_compressStream() with ZSTDMT_flushStream() or ZSTDMT_endStream() depending on flush directive. @return : minimum amount of data still to be flushed 0 if fully flushed or an error code |
ZSTDMT_compress_advanced⚠ | |
ZSTDMT_createCCtx⚠ | |
ZSTDMT_createCCtx_advanced⚠ | |
ZSTDMT_endStream⚠ | |
ZSTDMT_flushStream⚠ | |
ZSTDMT_freeCCtx⚠ | |
ZSTDMT_initCStream⚠ | |
ZSTDMT_initCStream_advanced⚠ | |
ZSTDMT_initCStream_internal⚠ |
ZSTDMT_initCStream_internal() : Private use only. Init streaming operation. expects params to be valid. must receive dict, or cdict, or none, but not both. @return : 0, or an error code |
ZSTDMT_initCStream_usingCDict⚠ | |
ZSTDMT_initializeCCtxParameters⚠ | |
ZSTDMT_resetCStream⚠ | |
ZSTDMT_setMTCtxParameter⚠ | |
ZSTDMT_sizeof_CCtx⚠ | |
ZSTD_CCtxParam_setParameter⚠ |
ZSTD_CCtxParam_setParameter() :
Similar to ZSTD_CCtx_setParameter.
Set one compression parameter, selected by enum ZSTD_cParameter.
Parameters must be applied to a ZSTD_CCtx using ZSTD_CCtx_setParametersUsingCCtxParams().
Note : when |
ZSTD_CCtx_loadDictionary⚠ |
ZSTD_CCtx_loadDictionary() :
Create an internal CDict from dict buffer.
Decompression will have to use same buffer.
@result : 0, or an error code (which can be tested with ZSTD_isError()).
Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
meaning "return to no-dictionary mode".
Note 1 : |
ZSTD_CCtx_loadDictionary_advanced⚠ | |
ZSTD_CCtx_loadDictionary_byReference⚠ | |
ZSTD_CCtx_refCDict⚠ |
ZSTD_CCtx_refCDict() : Reference a prepared dictionary, to be used for all next compression jobs. Note that compression parameters are enforced from within CDict, and supercede any compression parameter previously set within CCtx. The dictionary will remain valid for future compression jobs using same CCtx. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : adding a NULL CDict means "return to no-dictionary mode". Note 1 : Currently, only one dictionary can be managed. Adding a new dictionary effectively "discards" any previous one. Note 2 : CDict is just referenced, its lifetime must outlive CCtx. |
ZSTD_CCtx_refPrefix⚠ |
ZSTD_CCtx_refPrefix() : Reference a prefix (single-usage dictionary) for next compression job. Decompression need same prefix to properly regenerate data. Prefix is only used once. Tables are discarded at end of compression job. Subsequent compression jobs will be done without prefix (if none is explicitly referenced). If there is a need to use same prefix multiple times, consider embedding it into a ZSTD_CDict instead. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Adding any prefix (including NULL) invalidates any previous prefix or dictionary Note 1 : Prefix buffer is referenced. It must outlive compression job. Note 2 : Referencing a prefix involves building tables, which are dependent on compression parameters. It's a CPU-heavy operation, with non-negligible impact on latency. Note 3 : By default, the prefix is treated as raw content (ZSTD_dm_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode. |
ZSTD_CCtx_refPrefix_advanced⚠ | |
ZSTD_CCtx_reset⚠ |
ZSTD_CCtx_reset() : Return a CCtx to clean state. Useful after an error, or to interrupt an ongoing compression job and start a new one. Any internal data not yet flushed is cancelled. Dictionary (if any) is dropped. All parameters are back to default values. It's possible to modify compression parameters after a reset. |
ZSTD_CCtx_setParameter⚠ |
ZSTD_CCtx_setParameter() :
Set one compression parameter, selected by enum ZSTD_cParameter.
Note : when |
ZSTD_CCtx_setParametersUsingCCtxParams⚠ |
ZSTD_CCtx_setParametersUsingCCtxParams() : Apply a set of ZSTD_CCtx_params to the compression context. This must be done before the dictionary is loaded. The pledgedSrcSize is treated as unknown. Multithreading parameters are applied only if nbThreads > 1. |
ZSTD_CCtx_setPledgedSrcSize⚠ |
ZSTD_CCtx_setPledgedSrcSize() : Total input data size to be compressed as a single frame. This value will be controlled at the end, and result in error if not respected. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : 0 means zero, empty. In order to mean "unknown content size", pass constant ZSTD_CONTENTSIZE_UNKNOWN. Note that ZSTD_CONTENTSIZE_UNKNOWN is default value for new compression jobs. Note 2 : If all data is provided and consumed in a single round, this value is overriden by srcSize instead. |
ZSTD_CStreamInSize⚠ | |
ZSTD_CStreamOutSize⚠ | |
ZSTD_DCtx_loadDictionary⚠ |
ZSTD_DCtx_loadDictionary() :
Create an internal DDict from dict buffer,
to be used to decompress next frames.
@result : 0, or an error code (which can be tested with ZSTD_isError()).
Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
meaning "return to no-dictionary mode".
Note 1 : |
ZSTD_DCtx_loadDictionary_advanced⚠ | |
ZSTD_DCtx_loadDictionary_byReference⚠ | |
ZSTD_DCtx_refDDict⚠ |
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. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively "discards" any previous one. Special : adding a NULL DDict means "return to no-dictionary mode". Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx. |
ZSTD_DCtx_refPrefix⚠ |
ZSTD_DCtx_refPrefix() : Reference a prefix (single-usage dictionary) for next compression job. Prefix is only used once. It must be explicitly referenced before each frame. If there is a need to use same prefix multiple times, consider embedding it into a ZSTD_DDict instead. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary Note 2 : Prefix buffer is referenced. It must outlive compression job. Note 3 : By default, the prefix is treated as raw content (ZSTD_dm_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode. Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. |
ZSTD_DCtx_refPrefix_advanced⚠ | |
ZSTD_DCtx_reset⚠ |
ZSTD_DCtx_reset() : Return a DCtx to clean state. If a decompression was ongoing, any internal data not yet flushed is cancelled. All parameters are back to default values, including sticky ones. Dictionary (if any) is dropped. Parameters can be modified again after a reset. |
ZSTD_DCtx_setFormat⚠ |
ZSTD_DCtx_setFormat() : Instruct the decoder context about what kind of data to decode next. This instruction is mandatory to decode data without a fully-formed header, such ZSTD_f_zstd1_magicless for example. @return : 0, or an error code (which can be tested using ZSTD_isError()). |
ZSTD_DCtx_setMaxWindowSize⚠ |
ZSTD_DCtx_setMaxWindowSize() : Refuses allocating internal buffers for frames requiring a window size larger than provided limit. This is useful to prevent a decoder context from reserving too much memory for itself (potential attack scenario). This parameter is only useful in streaming mode, since no internal buffer is allocated in direct mode. By default, a decompression context accepts all window sizes <= (1 << ZSTD_WINDOWLOG_MAX) @return : 0, or an error code (which can be tested using ZSTD_isError()). |
ZSTD_DStreamInSize⚠ | |
ZSTD_DStreamOutSize⚠ | |
ZSTD_adjustCParams⚠ |
ZSTD_adjustCParams() :
optimize params for a given |
ZSTD_checkCParams⚠ |
ZSTD_checkCParams() : Ensure param values remain within authorized range |
ZSTD_compress⚠ |
Simple API
/
/*! ZSTD_compress() :
Compresses |
ZSTD_compressBegin⚠ |
Buffer-less streaming compression (synchronous mode) |
ZSTD_compressBegin_advanced⚠ | |
ZSTD_compressBegin_usingCDict⚠ | |
ZSTD_compressBegin_usingCDict_advanced⚠ | |
ZSTD_compressBegin_usingDict⚠ | |
ZSTD_compressBlock⚠ | |
ZSTD_compressBound⚠ | |
ZSTD_compressCCtx⚠ |
ZSTD_compressCCtx() : Same as ZSTD_compress(), requires an allocated ZSTD_CCtx (see ZSTD_createCCtx()). |
ZSTD_compressContinue⚠ | |
ZSTD_compressEnd⚠ | |
ZSTD_compressStream⚠ | |
ZSTD_compress_advanced⚠ |
ZSTD_compress_advanced() : Same as ZSTD_compress_usingDict(), with fine-tune control over each compression parameter |
ZSTD_compress_generic⚠ |
ZSTD_compress_generic() : Behave about the same as ZSTD_compressStream. To note : - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_setParameter() - Compression parameters cannot be changed once compression is started. - outpot->pos must be <= dstCapacity, input->pos must be <= srcSize - outpot->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - @return provides the minimum amount of data still to flush from internal buffers or an error code, which can be tested using ZSTD_isError(). if @return != 0, flush is not fully completed, there is some data left within internal buffers. - after a ZSTD_e_end directive, if internal buffer is not fully flushed, only ZSTD_e_end or ZSTD_e_flush operations are allowed. It is necessary to fully flush internal buffers before starting a new compression job, or changing compression parameters. |
ZSTD_compress_generic_simpleArgs⚠ |
ZSTD_compress_generic_simpleArgs() : Same as ZSTD_compress_generic(), but using only integral types as arguments. Argument list is larger than ZSTD_{in,out}Buffer, but can be helpful for binders from dynamic languages which have troubles handling structures containing memory pointers. |
ZSTD_compress_usingCDict⚠ |
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 level is decided during dictionary creation. Frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no) |
ZSTD_compress_usingCDict_advanced⚠ |
ZSTD_compress_usingCDict_advanced() : Same as ZSTD_compress_usingCDict(), with fine-tune control over frame parameters |
ZSTD_compress_usingDict⚠ |
Simple dictionary API
/
/*! ZSTD_compress_usingDict() :
Compression using a predefined Dictionary (see dictBuilder/zdict.h).
Note : This function loads the dictionary, resulting in significant startup delay.
Note : When |
ZSTD_copyCCtx⚠ | |
ZSTD_copyDCtx⚠ | |
ZSTD_createCCtx⚠ | |
ZSTD_createCCtxParams⚠ |
ZSTD_CCtx_params : Quick howto : - ZSTD_createCCtxParams() : Create a ZSTD_CCtx_params structure - ZSTD_CCtxParam_setParameter() : Push parameters one by one into an existing ZSTD_CCtx_params structure. This is similar to ZSTD_CCtx_setParameter(). - ZSTD_CCtx_setParametersUsingCCtxParams() : Apply parameters to an existing CCtx. These parameters will be applied to all subsequent compression jobs. - ZSTD_compress_generic() : Do compression using the CCtx. - ZSTD_freeCCtxParams() : Free the memory. |
ZSTD_createCCtx_advanced⚠ |
Advanced compression functions / /*! ZSTD_createCCtx_advanced() : Create a ZSTD compression context using external alloc and free functions |
ZSTD_createCDict⚠ |
ZSTD_createCDict() :
When compressing multiple messages / blocks with the same dictionary, it's recommended to load it just once.
ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.
ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
|
ZSTD_createCDict_advanced⚠ |
ZSTD_createCDict_advanced() : Create a ZSTD_CDict using external alloc and free, and customized compression parameters |
ZSTD_createCDict_byReference⚠ |
ZSTD_createCDict_byReference() : Create a digested dictionary for compression Dictionary content is simply referenced, and therefore stays in dictBuffer. It is important that dictBuffer outlives CDict, it must remain read accessible throughout the lifetime of CDict |
ZSTD_createCStream⚠ | |
ZSTD_createCStream_advanced⚠ |
Advanced streaming functions |
ZSTD_createDCtx⚠ | |
ZSTD_createDCtx_advanced⚠ |
ZSTD_createDCtx_advanced() : Create a ZSTD decompression context using external alloc and free functions |
ZSTD_createDDict⚠ |
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_advanced⚠ |
ZSTD_createDDict_advanced() : Create a ZSTD_DDict using external alloc and free, optionally by reference |
ZSTD_createDDict_byReference⚠ |
ZSTD_createDDict_byReference() : Create a digested dictionary, ready to start decompression operation without startup delay. Dictionary content is referenced, and therefore stays in dictBuffer. It is important that dictBuffer outlives DDict, it must remain read accessible throughout the lifetime of DDict |
ZSTD_createDStream⚠ | |
ZSTD_createDStream_advanced⚠ | |
ZSTD_decodingBufferSize_min⚠ | |
ZSTD_decompress⚠ |
ZSTD_decompress() :
|
ZSTD_decompressBegin⚠ | |
ZSTD_decompressBegin_usingDDict⚠ | |
ZSTD_decompressBegin_usingDict⚠ | |
ZSTD_decompressBlock⚠ | |
ZSTD_decompressContinue⚠ | |
ZSTD_decompressDCtx⚠ |
ZSTD_decompressDCtx() : Same as ZSTD_decompress(), requires an allocated ZSTD_DCtx (see ZSTD_createDCtx()) |
ZSTD_decompressStream⚠ | |
ZSTD_decompress_generic⚠ |
ZSTD_decompress_generic() :
Behave the same as ZSTD_decompressStream.
Decompression parameters cannot be changed once decompression is started.
@return : an error code, which can be tested using ZSTD_isError()
if >0, a hint, nb of expected input bytes for next invocation.
|
ZSTD_decompress_generic_simpleArgs⚠ |
ZSTD_decompress_generic_simpleArgs() : Same as ZSTD_decompress_generic(), but using only integral types as arguments. Argument list is larger than ZSTD_{in,out}Buffer, but can be helpful for binders from dynamic languages which have troubles handling structures containing memory pointers. |
ZSTD_decompress_usingDDict⚠ |
ZSTD_decompress_usingDDict() : Decompression using a digested Dictionary. Faster startup than ZSTD_decompress_usingDict(), recommended when same dictionary is used multiple times. |
ZSTD_decompress_usingDict⚠ |
ZSTD_decompress_usingDict() :
Decompression using a predefined Dictionary (see dictBuilder/zdict.h).
Dictionary must be identical to the one used during compression.
Note : This function loads the dictionary, resulting in significant startup delay.
Note : When |
ZSTD_endStream⚠ | |
ZSTD_estimateCCtxSize⚠ |
ZSTD_estimate*() : These functions make it possible to estimate memory usage of a future {D,C}Ctx, before its creation. ZSTD_estimateCCtxSize() will provide a budget large enough for any compression level up to selected one. It will also consider src size to be arbitrarily "large", which is worst case. If srcSize is known to always be small, ZSTD_estimateCCtxSize_usingCParams() can provide a tighter estimation. ZSTD_estimateCCtxSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel. ZSTD_estimateCCtxSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParam_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_p_nbThreads is > 1. Note : CCtx estimation is only correct for single-threaded compression |
ZSTD_estimateCCtxSize_usingCCtxParams⚠ | |
ZSTD_estimateCCtxSize_usingCParams⚠ | |
ZSTD_estimateCDictSize⚠ |
ZSTD_estimate?DictSize() : ZSTD_estimateCDictSize() will bet that src size is relatively "small", and content is copied, like ZSTD_createCDict(). ZSTD_estimateCStreamSize_advanced_usingCParams() makes it possible to control precisely compression parameters, like ZSTD_createCDict_advanced(). Note : dictionary created by reference using ZSTD_dlm_byRef are smaller |
ZSTD_estimateCDictSize_advanced⚠ | |
ZSTD_estimateCStreamSize⚠ |
ZSTD_estimateCStreamSize() : ZSTD_estimateCStreamSize() will provide a budget large enough for any compression level up to selected one. It will also consider src size to be arbitrarily "large", which is worst case. If srcSize is known to always be small, ZSTD_estimateCStreamSize_usingCParams() can provide a tighter estimation. ZSTD_estimateCStreamSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel. ZSTD_estimateCStreamSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParam_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_p_nbThreads is set to a value > 1. Note : CStream estimation is only correct for single-threaded compression. ZSTD_DStream memory budget depends on window Size. This information can be passed manually, using ZSTD_estimateDStreamSize, or deducted from a valid frame Header, using ZSTD_estimateDStreamSize_fromFrame(); Note : if streaming is init with function ZSTD_init?Stream_usingDict(), an internal ?Dict will be created, which additional size is not estimated here. In this case, get total size by adding ZSTD_estimate?DictSize |
ZSTD_estimateCStreamSize_usingCCtxParams⚠ | |
ZSTD_estimateCStreamSize_usingCParams⚠ | |
ZSTD_estimateDCtxSize⚠ | |
ZSTD_estimateDDictSize⚠ | |
ZSTD_estimateDStreamSize⚠ | |
ZSTD_estimateDStreamSize_fromFrame⚠ | |
ZSTD_findDecompressedSize⚠ |
ZSTD_findDecompressedSize() :
|
ZSTD_findFrameCompressedSize⚠ |
ZSTD_findFrameCompressedSize() :
|
ZSTD_flushStream⚠ | |
ZSTD_frameHeaderSize⚠ |
ZSTD_frameHeaderSize() :
|
ZSTD_freeCCtx⚠ | |
ZSTD_freeCCtxParams⚠ | |
ZSTD_freeCDict⚠ |
ZSTD_freeCDict() : Function frees memory allocated by ZSTD_createCDict(). |
ZSTD_freeCStream⚠ | |
ZSTD_freeDCtx⚠ | |
ZSTD_freeDDict⚠ |
ZSTD_freeDDict() : Function frees memory allocated with ZSTD_createDDict() |
ZSTD_freeDStream⚠ | |
ZSTD_getBlockSize⚠ | |
ZSTD_getCParams⚠ |
ZSTD_getCParams() :
@return ZSTD_compressionParameters structure for a selected compression level and estimated srcSize.
|
ZSTD_getDecompressedSize⚠ |
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 in the same return value (0), while ZSTD_getFrameContentSize() distinguishes them. |
ZSTD_getDictID_fromDDict⚠ |
ZSTD_getDictID_fromDDict() :
Provides the dictID of the dictionary loaded into |
ZSTD_getDictID_fromDict⚠ |
ZSTD_getDictID_fromDict() : Provides the dictID stored within dictionary. if @return == 0, the dictionary is not conformant with Zstandard specification. It can still be loaded, but as a content-only dictionary. |
ZSTD_getDictID_fromFrame⚠ |
ZSTD_getDictID_fromFrame() :
Provides the dictID required to decompressed the frame stored within |
ZSTD_getErrorName⚠ | |
ZSTD_getFrameContentSize⚠ | |
ZSTD_getFrameHeader⚠ | |
ZSTD_getParams⚠ |
ZSTD_getParams() :
same as ZSTD_getCParams(), but @return a full |
ZSTD_initCCtxParams⚠ |
ZSTD_initCCtxParams() : Initializes the compression parameters of cctxParams according to compression level. All other parameters are reset to their default values. |
ZSTD_initCCtxParams_advanced⚠ |
ZSTD_initCCtxParams_advanced() : Initializes the compression and frame parameters of cctxParams according to params. All other parameters are reset to their default values. |
ZSTD_initCStream⚠ | |
ZSTD_initCStream_advanced⚠ | |
ZSTD_initCStream_srcSize⚠ | |
ZSTD_initCStream_usingCDict⚠ | |
ZSTD_initCStream_usingCDict_advanced⚠ | |
ZSTD_initCStream_usingDict⚠ | |
ZSTD_initDStream⚠ | |
ZSTD_initDStream_usingDDict⚠ | |
ZSTD_initDStream_usingDict⚠ | |
ZSTD_initStaticCCtx⚠ |
ZSTD_initStaticCCtx() : initialize a fixed-size zstd compression context workspace: The memory area to emplace the context into. Provided pointer must 8-bytes aligned. It must outlive context usage. workspaceSize: Use ZSTD_estimateCCtxSize() or ZSTD_estimateCStreamSize() to determine how large workspace must be to support scenario. @return : pointer to ZSTD_CCtx*, or NULL if error (size too small) Note : zstd will never resize nor malloc() when using a static cctx. If it needs more memory than available, it will simply error out. Note 2 : there is no corresponding "free" function. Since workspace was allocated externally, it must be freed externally too. Limitation 1 : currently not compatible with internal CDict creation, such as ZSTD_CCtx_loadDictionary() or ZSTD_initCStream_usingDict(). Limitation 2 : currently not compatible with multi-threading |
ZSTD_initStaticCDict⚠ |
ZSTD_initStaticCDict_advanced() : Generate a digested dictionary in provided memory area. workspace: The memory area to emplace the dictionary into. Provided pointer must 8-bytes aligned. It must outlive dictionary usage. workspaceSize: Use ZSTD_estimateCDictSize() to determine how large workspace must be. cParams : use ZSTD_getCParams() to transform a compression level into its relevants cParams. @return : pointer to ZSTD_CDict*, or NULL if error (size too small) Note : there is no corresponding "free" function. Since workspace was allocated externally, it must be freed externally. |
ZSTD_initStaticCStream⚠ | |
ZSTD_initStaticDCtx⚠ |
ZSTD_initStaticDCtx() : initialize a fixed-size zstd decompression context workspace: The memory area to emplace the context into. Provided pointer must 8-bytes aligned. It must outlive context usage. workspaceSize: Use ZSTD_estimateDCtxSize() or ZSTD_estimateDStreamSize() to determine how large workspace must be to support scenario. @return : pointer to ZSTD_DCtx*, or NULL if error (size too small) Note : zstd will never resize nor malloc() when using a static dctx. If it needs more memory than available, it will simply error out. Note 2 : static dctx is incompatible with legacy support Note 3 : there is no corresponding "free" function. Since workspace was allocated externally, it must be freed externally. Limitation : currently not compatible with internal DDict creation, such as ZSTD_initDStream_usingDict(). |
ZSTD_initStaticDDict⚠ |
ZSTD_initStaticDDict() : Generate a digested dictionary in provided memory area. workspace: The memory area to emplace the dictionary into. Provided pointer must 8-bytes aligned. It must outlive dictionary usage. workspaceSize: Use ZSTD_estimateDDictSize() to determine how large workspace must be. @return : pointer to ZSTD_DDict*, or NULL if error (size too small) Note : there is no corresponding "free" function. Since workspace was allocated externally, it must be freed externally. |
ZSTD_initStaticDStream⚠ | |
ZSTD_insertBlock⚠ | |
ZSTD_isError⚠ | |
ZSTD_isFrame⚠ |
ZSTD_isFrame() :
Tells if the content of |
ZSTD_maxCLevel⚠ | |
ZSTD_nextInputType⚠ | |
ZSTD_nextSrcSizeToDecompress⚠ | |
ZSTD_resetCCtxParams⚠ |
ZSTD_resetCCtxParams() : Reset params to default, with the default compression level. |
ZSTD_resetCStream⚠ |
ZSTD_resetCStream() : start a new compression job, using same parameters from previous job. This is typically useful to skip dictionary loading stage, since it will re-use it in-place.. Note that zcs must be init at least once before using ZSTD_resetCStream(). pledgedSrcSize==0 means "srcSize unknown". If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end. @return : 0, or an error code (which can be tested using ZSTD_isError()) |
ZSTD_resetDStream⚠ | |
ZSTD_setDStreamParameter⚠ | |
ZSTD_sizeof_CCtx⚠ |
ZSTD_sizeof_*() : These functions give the current memory usage of selected object. Object memory usage can evolve when re-used multiple times. |
ZSTD_sizeof_CDict⚠ | |
ZSTD_sizeof_CStream⚠ | |
ZSTD_sizeof_DCtx⚠ | |
ZSTD_sizeof_DDict⚠ | |
ZSTD_sizeof_DStream⚠ | |
ZSTD_versionNumber⚠ | |
ZSTD_versionString⚠ |
Type Definitions
ZSTDMT_CCtx | |
ZSTD_CCtx |
Explicit memory management |
ZSTD_CCtx_params | |
ZSTD_CDict |
Bulk processing dictionary API |
ZSTD_CStream | |
ZSTD_DCtx | |
ZSTD_DDict | |
ZSTD_DStream | |
ZSTD_allocFunction | |
ZSTD_freeFunction | |
ZSTD_inBuffer | |
ZSTD_outBuffer | |
wchar_t |