#include <stddef.h>
#include "../common/mem.h"
Go to the source code of this file.
|
size_t | ZSTDv05_decompress (void *dst, size_t dstCapacity, const void *src, size_t compressedSize) |
|
void | ZSTDv05_findFrameSizeInfoLegacy (const void *src, size_t srcSize, size_t *cSize, unsigned long long *dBound) |
|
unsigned | ZSTDv05_isError (size_t code) |
|
const char * | ZSTDv05_getErrorName (size_t code) |
|
ZSTDv05_DCtx * | ZSTDv05_createDCtx (void) |
|
size_t | ZSTDv05_freeDCtx (ZSTDv05_DCtx *dctx) |
|
size_t | ZSTDv05_decompressDCtx (ZSTDv05_DCtx *ctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
|
size_t | ZSTDv05_decompress_usingDict (ZSTDv05_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize) |
|
size_t | ZSTDv05_getFrameParams (ZSTDv05_parameters *params, const void *src, size_t srcSize) |
|
size_t | ZSTDv05_decompressBegin_usingDict (ZSTDv05_DCtx *dctx, const void *dict, size_t dictSize) |
|
void | ZSTDv05_copyDCtx (ZSTDv05_DCtx *dstDCtx, const ZSTDv05_DCtx *srcDCtx) |
|
size_t | ZSTDv05_nextSrcSizeToDecompress (ZSTDv05_DCtx *dctx) |
|
size_t | ZSTDv05_decompressContinue (ZSTDv05_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
|
ZBUFFv05_DCtx * | ZBUFFv05_createDCtx (void) |
|
size_t | ZBUFFv05_freeDCtx (ZBUFFv05_DCtx *dctx) |
|
size_t | ZBUFFv05_decompressInit (ZBUFFv05_DCtx *dctx) |
|
size_t | ZBUFFv05_decompressInitDictionary (ZBUFFv05_DCtx *dctx, const void *dict, size_t dictSize) |
|
size_t | ZBUFFv05_decompressContinue (ZBUFFv05_DCtx *dctx, void *dst, size_t *dstCapacityPtr, const void *src, size_t *srcSizePtr) |
|
unsigned | ZBUFFv05_isError (size_t errorCode) |
|
const char * | ZBUFFv05_getErrorName (size_t errorCode) |
|
size_t | ZBUFFv05_recommendedDInSize (void) |
|
size_t | ZBUFFv05_recommendedDOutSize (void) |
|
◆ ZSTDv05_MAGICNUMBER
#define ZSTDv05_MAGICNUMBER 0xFD2FB525 /* v0.5 */ |
◆ ZSTDv05_strategy
Enumerator |
---|
ZSTDv05_fast | |
ZSTDv05_greedy | |
ZSTDv05_lazy | |
ZSTDv05_lazy2 | |
ZSTDv05_btlazy2 | |
ZSTDv05_opt | |
ZSTDv05_btopt | |
◆ ZBUFFv05_createDCtx()
◆ ZBUFFv05_decompressContinue()
size_t ZBUFFv05_decompressContinue |
( |
ZBUFFv05_DCtx * | dctx, |
|
|
void * | dst, |
|
|
size_t * | dstCapacityPtr, |
|
|
const void * | src, |
|
|
size_t * | srcSizePtr ) |
◆ ZBUFFv05_decompressInit()
◆ ZBUFFv05_decompressInitDictionary()
size_t ZBUFFv05_decompressInitDictionary |
( |
ZBUFFv05_DCtx * | dctx, |
|
|
const void * | dict, |
|
|
size_t | dictSize ) |
◆ ZBUFFv05_freeDCtx()
◆ ZBUFFv05_getErrorName()
const char * ZBUFFv05_getErrorName |
( |
size_t | errorCode | ) |
|
◆ ZBUFFv05_isError()
unsigned ZBUFFv05_isError |
( |
size_t | errorCode | ) |
|
◆ ZBUFFv05_recommendedDInSize()
size_t ZBUFFv05_recommendedDInSize |
( |
void | | ) |
|
Functions below provide recommended buffer sizes for Compression or Decompression operations. These sizes are just hints, and tend to offer better latency
◆ ZBUFFv05_recommendedDOutSize()
size_t ZBUFFv05_recommendedDOutSize |
( |
void | | ) |
|
◆ ZSTDv05_copyDCtx()
◆ ZSTDv05_createDCtx()
◆ ZSTDv05_decompress()
size_t ZSTDv05_decompress |
( |
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | compressedSize ) |
ZSTDv05_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 ZSTDv05_isError())
◆ ZSTDv05_decompress_usingDict()
size_t ZSTDv05_decompress_usingDict |
( |
ZSTDv05_DCtx * | dctx, |
|
|
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | srcSize, |
|
|
const void * | dict, |
|
|
size_t | dictSize ) |
ZSTDv05_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 ZSTDv05_decompressDCtx()
◆ ZSTDv05_decompressBegin_usingDict()
size_t ZSTDv05_decompressBegin_usingDict |
( |
ZSTDv05_DCtx * | dctx, |
|
|
const void * | dict, |
|
|
size_t | dictSize ) |
◆ ZSTDv05_decompressContinue()
size_t ZSTDv05_decompressContinue |
( |
ZSTDv05_DCtx * | dctx, |
|
|
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | srcSize ) |
◆ ZSTDv05_decompressDCtx()
size_t ZSTDv05_decompressDCtx |
( |
ZSTDv05_DCtx * | ctx, |
|
|
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | srcSize ) |
◆ ZSTDv05_findFrameSizeInfoLegacy()
void ZSTDv05_findFrameSizeInfoLegacy |
( |
const void * | src, |
|
|
size_t | srcSize, |
|
|
size_t * | cSize, |
|
|
unsigned long long * | dBound ) |
ZSTDv05_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.5.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.
◆ ZSTDv05_freeDCtx()
◆ ZSTDv05_getErrorName()
const char * ZSTDv05_getErrorName |
( |
size_t | code | ) |
|
provides readable string for an error code
ZSTDv05_getErrorName() : provides error code string (useful for debugging)
◆ ZSTDv05_getFrameParams()
◆ ZSTDv05_isError()
unsigned ZSTDv05_isError |
( |
size_t | code | ) |
|
tells if a size_t
function result is an error code
ZSTDv05_isError() : tells if a return value is an error code
◆ ZSTDv05_nextSrcSizeToDecompress()
size_t ZSTDv05_nextSrcSizeToDecompress |
( |
ZSTDv05_DCtx * | dctx | ) |
|