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

Go to the source code of this file.

Data Structures

struct  ZSTDv05_parameters
 

Macros

#define ZSTDv05_MAGICNUMBER   0xFD2FB525 /* v0.5 */
 

Typedefs

typedef struct ZSTDv05_DCtx_s ZSTDv05_DCtx
 
typedef struct ZBUFFv05_DCtx_s ZBUFFv05_DCtx
 

Enumerations

enum  ZSTDv05_strategy {
  ZSTDv05_fast , ZSTDv05_greedy , ZSTDv05_lazy , ZSTDv05_lazy2 ,
  ZSTDv05_btlazy2 , ZSTDv05_opt , ZSTDv05_btopt
}
 

Functions

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_DCtxZSTDv05_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_DCtxZBUFFv05_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)
 

Macro Definition Documentation

◆ ZSTDv05_MAGICNUMBER

#define ZSTDv05_MAGICNUMBER   0xFD2FB525 /* v0.5 */

Typedef Documentation

◆ ZBUFFv05_DCtx

◆ ZSTDv05_DCtx

typedef struct ZSTDv05_DCtx_s ZSTDv05_DCtx

Decompression context

Enumeration Type Documentation

◆ ZSTDv05_strategy

Enumerator
ZSTDv05_fast 
ZSTDv05_greedy 
ZSTDv05_lazy 
ZSTDv05_lazy2 
ZSTDv05_btlazy2 
ZSTDv05_opt 
ZSTDv05_btopt 

Function Documentation

◆ ZBUFFv05_createDCtx()

ZBUFFv05_DCtx * ZBUFFv05_createDCtx ( void )

◆ ZBUFFv05_decompressContinue()

size_t ZBUFFv05_decompressContinue ( ZBUFFv05_DCtx * dctx,
void * dst,
size_t * dstCapacityPtr,
const void * src,
size_t * srcSizePtr )

◆ ZBUFFv05_decompressInit()

size_t ZBUFFv05_decompressInit ( ZBUFFv05_DCtx * dctx)

◆ ZBUFFv05_decompressInitDictionary()

size_t ZBUFFv05_decompressInitDictionary ( ZBUFFv05_DCtx * dctx,
const void * dict,
size_t dictSize )

◆ ZBUFFv05_freeDCtx()

size_t ZBUFFv05_freeDCtx ( ZBUFFv05_DCtx * dctx)

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

void ZSTDv05_copyDCtx ( ZSTDv05_DCtx * dstDCtx,
const ZSTDv05_DCtx * srcDCtx )

◆ ZSTDv05_createDCtx()

ZSTDv05_DCtx * ZSTDv05_createDCtx ( void )

◆ 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_decompressDCtx() : Same as ZSTDv05_decompress(), but requires an already allocated ZSTDv05_DCtx (see ZSTDv05_createDCtx())

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

size_t ZSTDv05_freeDCtx ( ZSTDv05_DCtx * dctx)
Returns
: errorCode

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

size_t ZSTDv05_getFrameParams ( ZSTDv05_parameters * params,
const void * src,
size_t srcSize )

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