Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
zstd_v06.h File Reference
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  ZSTDv06_frameParams_s
 

Macros

#define ZSTDLIBv06_API
 
#define ZSTDv06_MAGICNUMBER   0xFD2FB526 /* v0.6 */
 

Functions

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_DCtxZSTDv06_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_DCtxZBUFFv06_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)
 

Macro Definition Documentation

◆ ZSTDLIBv06_API

#define ZSTDLIBv06_API

ZSTDv06_DLL_EXPORT : Enable exporting of functions when building a Windows DLL

◆ ZSTDv06_MAGICNUMBER

#define ZSTDv06_MAGICNUMBER   0xFD2FB526 /* v0.6 */

Function Documentation

◆ ZBUFFv06_createDCtx()

ZSTDLIBv06_API ZBUFFv06_DCtx * ZBUFFv06_createDCtx ( void )

◆ ZBUFFv06_decompressContinue()

ZSTDLIBv06_API size_t ZBUFFv06_decompressContinue ( ZBUFFv06_DCtx * dctx,
void * dst,
size_t * dstCapacityPtr,
const void * src,
size_t * srcSizePtr )

◆ ZBUFFv06_decompressInit()

ZSTDLIBv06_API size_t ZBUFFv06_decompressInit ( ZBUFFv06_DCtx * dctx)

◆ ZBUFFv06_decompressInitDictionary()

ZSTDLIBv06_API size_t ZBUFFv06_decompressInitDictionary ( ZBUFFv06_DCtx * dctx,
const void * dict,
size_t dictSize )

◆ ZBUFFv06_freeDCtx()

ZSTDLIBv06_API size_t ZBUFFv06_freeDCtx ( ZBUFFv06_DCtx * dctx)

◆ ZBUFFv06_getErrorName()

ZSTDLIBv06_API const char * ZBUFFv06_getErrorName ( size_t errorCode)

◆ ZBUFFv06_isError()

ZSTDLIBv06_API unsigned ZBUFFv06_isError ( size_t errorCode)

◆ ZBUFFv06_recommendedDInSize()

ZSTDLIBv06_API size_t ZBUFFv06_recommendedDInSize ( void )

Functions below provide recommended buffer sizes for Compression or Decompression operations. These sizes are just hints, they tend to offer better latency

◆ ZBUFFv06_recommendedDOutSize()

ZSTDLIBv06_API size_t ZBUFFv06_recommendedDOutSize ( void )

◆ ZSTDv06_compressBound()

ZSTDLIBv06_API size_t ZSTDv06_compressBound ( size_t srcSize)

maximum compressed size (worst case scenario)

◆ ZSTDv06_copyDCtx()

ZSTDLIBv06_API void ZSTDv06_copyDCtx ( ZSTDv06_DCtx * dctx,
const ZSTDv06_DCtx * preparedDCtx )

◆ ZSTDv06_createDCtx()

ZSTDLIBv06_API ZSTDv06_DCtx * ZSTDv06_createDCtx ( void )

◆ 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()

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 )

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()

ZSTDLIBv06_API size_t ZSTDv06_decompressBegin_usingDict ( ZSTDv06_DCtx * dctx,
const void * dict,
size_t dictSize )

◆ ZSTDv06_decompressContinue()

ZSTDLIBv06_API size_t ZSTDv06_decompressContinue ( ZSTDv06_DCtx * dctx,
void * dst,
size_t dstCapacity,
const void * src,
size_t srcSize )

◆ ZSTDv06_decompressDCtx()

ZSTDLIBv06_API size_t ZSTDv06_decompressDCtx ( ZSTDv06_DCtx * ctx,
void * dst,
size_t dstCapacity,
const void * src,
size_t srcSize )

ZSTDv06_decompressDCtx() : Same as ZSTDv06_decompress(), but requires an already allocated ZSTDv06_DCtx (see ZSTDv06_createDCtx())

◆ 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()

ZSTDLIBv06_API size_t ZSTDv06_freeDCtx ( ZSTDv06_DCtx * dctx)
Returns
: errorCode

◆ ZSTDv06_getErrorName()

ZSTDLIBv06_API const char * ZSTDv06_getErrorName ( size_t code)

provides readable string for an error code

ZSTDv06_getErrorName() : provides error code string from function result (useful for debugging)

◆ ZSTDv06_getFrameParams()

ZSTDLIBv06_API size_t ZSTDv06_getFrameParams ( ZSTDv06_frameParams * fparamsPtr,
const void * src,
size_t srcSize )

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()

ZSTDLIBv06_API unsigned ZSTDv06_isError ( size_t code)

tells if a size_t function result is an error code

ZSTDv06_isError() : tells if a return value is an error code

◆ ZSTDv06_nextSrcSizeToDecompress()

ZSTDLIBv06_API size_t ZSTDv06_nextSrcSizeToDecompress ( ZSTDv06_DCtx * dctx)