#include <stddef.h>
Go to the source code of this file.
|
ZSTDLIBv06_API size_t | ZSTDv06_decompress (void *dst, size_t dstCapacity, const void *src, size_t compressedSize) |
|
void | ZSTDv06_findFrameSizeInfoLegacy (const void *src, size_t srcSize, size_t *cSize, unsigned long long *dBound) |
|
ZSTDLIBv06_API size_t | ZSTDv06_compressBound (size_t srcSize) |
|
ZSTDLIBv06_API unsigned | ZSTDv06_isError (size_t code) |
|
ZSTDLIBv06_API const char * | ZSTDv06_getErrorName (size_t code) |
|
ZSTDLIBv06_API ZSTDv06_DCtx * | ZSTDv06_createDCtx (void) |
|
ZSTDLIBv06_API size_t | ZSTDv06_freeDCtx (ZSTDv06_DCtx *dctx) |
|
ZSTDLIBv06_API size_t | ZSTDv06_decompressDCtx (ZSTDv06_DCtx *ctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
|
ZSTDLIBv06_API size_t | ZSTDv06_decompress_usingDict (ZSTDv06_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize) |
|
ZSTDLIBv06_API size_t | ZSTDv06_getFrameParams (ZSTDv06_frameParams *fparamsPtr, const void *src, size_t srcSize) |
|
ZSTDLIBv06_API size_t | ZSTDv06_decompressBegin_usingDict (ZSTDv06_DCtx *dctx, const void *dict, size_t dictSize) |
|
ZSTDLIBv06_API void | ZSTDv06_copyDCtx (ZSTDv06_DCtx *dctx, const ZSTDv06_DCtx *preparedDCtx) |
|
ZSTDLIBv06_API size_t | ZSTDv06_nextSrcSizeToDecompress (ZSTDv06_DCtx *dctx) |
|
ZSTDLIBv06_API size_t | ZSTDv06_decompressContinue (ZSTDv06_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
|
ZSTDLIBv06_API ZBUFFv06_DCtx * | ZBUFFv06_createDCtx (void) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_freeDCtx (ZBUFFv06_DCtx *dctx) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_decompressInit (ZBUFFv06_DCtx *dctx) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_decompressInitDictionary (ZBUFFv06_DCtx *dctx, const void *dict, size_t dictSize) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_decompressContinue (ZBUFFv06_DCtx *dctx, void *dst, size_t *dstCapacityPtr, const void *src, size_t *srcSizePtr) |
|
ZSTDLIBv06_API unsigned | ZBUFFv06_isError (size_t errorCode) |
|
ZSTDLIBv06_API const char * | ZBUFFv06_getErrorName (size_t errorCode) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_recommendedDInSize (void) |
|
ZSTDLIBv06_API size_t | ZBUFFv06_recommendedDOutSize (void) |
|
◆ ZSTDLIBv06_API
ZSTDv06_DLL_EXPORT : Enable exporting of functions when building a Windows DLL
◆ ZSTDv06_MAGICNUMBER
#define ZSTDv06_MAGICNUMBER 0xFD2FB526 /* v0.6 */ |
◆ ZBUFFv06_createDCtx()
◆ ZBUFFv06_decompressContinue()
◆ ZBUFFv06_decompressInit()
◆ ZBUFFv06_decompressInitDictionary()
◆ ZBUFFv06_freeDCtx()
◆ ZBUFFv06_getErrorName()
◆ ZBUFFv06_isError()
◆ ZBUFFv06_recommendedDInSize()
Functions below provide recommended buffer sizes for Compression or Decompression operations. These sizes are just hints, they tend to offer better latency
◆ ZBUFFv06_recommendedDOutSize()
◆ ZSTDv06_compressBound()
maximum compressed size (worst case scenario)
◆ ZSTDv06_copyDCtx()
◆ ZSTDv06_createDCtx()
◆ ZSTDv06_decompress()
ZSTDLIBv06_API size_t ZSTDv06_decompress |
( |
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | compressedSize ) |
ZSTDv06_decompress() : compressedSize
: is the exact size of the compressed blob, otherwise decompression will fail. dstCapacity
must be large enough, equal or larger than originalSize.
- Returns
- : the number of bytes decompressed into
dst
(<= dstCapacity
), or an errorCode if it fails (which can be tested using ZSTDv06_isError())
◆ ZSTDv06_decompress_usingDict()
ZSTDv06_decompress_usingDict() : Decompression using a pre-defined Dictionary content (see dictBuilder). Dictionary must be identical to the one used during compression, otherwise regenerated data will be corrupted. Note : dict can be NULL, in which case, it's equivalent to ZSTDv06_decompressDCtx()
◆ ZSTDv06_decompressBegin_usingDict()
◆ ZSTDv06_decompressContinue()
◆ ZSTDv06_decompressDCtx()
◆ ZSTDv06_findFrameSizeInfoLegacy()
void ZSTDv06_findFrameSizeInfoLegacy |
( |
const void * | src, |
|
|
size_t | srcSize, |
|
|
size_t * | cSize, |
|
|
unsigned long long * | dBound ) |
ZSTDv06_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.6.x format srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src' cSize (output parameter) : the number of bytes that would be read to decompress this frame or an error code if it fails (which can be tested using ZSTDv01_isError()) dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes cSize
and dBound
are not NULL.
◆ ZSTDv06_freeDCtx()
◆ ZSTDv06_getErrorName()
provides readable string for an error code
ZSTDv06_getErrorName() : provides error code string from function result (useful for debugging)
◆ ZSTDv06_getFrameParams()
doesn't consume input
ZSTDv06_getFrameParams() : decode Frame Header, or provide expected srcSize
.
- Returns
- : 0,
fparamsPtr
is correctly filled, >0, srcSize
is too small, result is expected srcSize
, or an error code, which can be tested using ZSTDv06_isError()
◆ ZSTDv06_isError()
tells if a size_t
function result is an error code
ZSTDv06_isError() : tells if a return value is an error code
◆ ZSTDv06_nextSrcSizeToDecompress()