Project Alice
Loading...
Searching...
No Matches
zstd_compress.c File Reference
#include "../common/allocations.h"
#include "../common/zstd_deps.h"
#include "../common/mem.h"
#include "hist.h"
#include "../common/fse.h"
#include "../common/huf.h"
#include "zstd_compress_internal.h"
#include "zstd_compress_sequences.h"
#include "zstd_compress_literals.h"
#include "zstd_fast.h"
#include "zstd_double_fast.h"
#include "zstd_lazy.h"
#include "zstd_opt.h"
#include "zstd_ldm.h"
#include "zstd_compress_superblock.h"
#include "../common/bits.h"
#include "clevels.h"
Include dependency graph for zstd_compress.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZSTD_CDict_s
 
struct  ZSTD_symbolEncodingTypeStats_t
 
struct  seqStoreSplits
 

Macros

#define FSE_STATIC_LINKING_ONLY   /* FSE_encodeSymbol */
 
#define ZSTD_COMPRESS_HEAPMODE   0
 
#define ZSTD_HASHLOG3_MAX   17
 
#define ZSTD_NO_CLEVEL   0
 
#define BOUNDCHECK(cParam, val)
 
#define CLAMP_TYPE(cParam, val, type)
 
#define CLAMP(cParam, val)   CLAMP_TYPE(cParam, val, unsigned)
 
#define ZSTD_INDEXOVERFLOW_MARGIN   (16 MB)
 
#define ZSTD_ROWSIZE   16
 
#define SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO   20
 
#define COMPRESS_LITERALS_SIZE_MIN   63 /* heuristic */
 
#define MIN_SEQUENCES_BLOCK_SPLITTING   300
 
#define ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF   (128 KB)
 
#define ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER   (6ULL)
 

Typedefs

typedef size_t(* ZSTD_sequenceCopier) (ZSTD_CCtx *cctx, ZSTD_sequencePosition *seqPos, const ZSTD_Sequence *const inSeqs, size_t inSeqsSize, const void *src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch)
 

Enumerations

enum  ZSTD_compResetPolicy_e { ZSTDcrp_makeClean , ZSTDcrp_leaveDirty }
 
enum  ZSTD_indexResetPolicy_e { ZSTDirp_continue , ZSTDirp_reset }
 
enum  ZSTD_resetTarget_e { ZSTD_resetTarget_CDict , ZSTD_resetTarget_CCtx }
 
enum  ZSTD_buildSeqStore_e { ZSTDbss_compress , ZSTDbss_noCompress }
 

Functions

size_t ZSTD_compressBound (size_t srcSize)
 
ZSTD_CCtxZSTD_createCCtx (void)
 
ZSTD_CCtxZSTD_createCCtx_advanced (ZSTD_customMem customMem)
 
ZSTD_CCtxZSTD_initStaticCCtx (void *workspace, size_t workspaceSize)
 
size_t ZSTD_freeCCtx (ZSTD_CCtx *cctx)
 
size_t ZSTD_sizeof_CCtx (const ZSTD_CCtx *cctx)
 
size_t ZSTD_sizeof_CStream (const ZSTD_CStream *zcs)
 
const seqStore_tZSTD_getSeqStore (const ZSTD_CCtx *ctx)
 
ZSTD_CCtx_params * ZSTD_createCCtxParams (void)
 
size_t ZSTD_freeCCtxParams (ZSTD_CCtx_params *params)
 
size_t ZSTD_CCtxParams_reset (ZSTD_CCtx_params *params)
 
size_t ZSTD_CCtxParams_init (ZSTD_CCtx_params *cctxParams, int compressionLevel)
 
size_t ZSTD_CCtxParams_init_advanced (ZSTD_CCtx_params *cctxParams, ZSTD_parameters params)
 
ZSTD_bounds ZSTD_cParam_getBounds (ZSTD_cParameter param)
 
size_t ZSTD_CCtx_setParameter (ZSTD_CCtx *cctx, ZSTD_cParameter param, int value)
 
size_t ZSTD_CCtxParams_setParameter (ZSTD_CCtx_params *CCtxParams, ZSTD_cParameter param, int value)
 
size_t ZSTD_CCtx_getParameter (ZSTD_CCtx const *cctx, ZSTD_cParameter param, int *value)
 
size_t ZSTD_CCtxParams_getParameter (ZSTD_CCtx_params const *CCtxParams, ZSTD_cParameter param, int *value)
 
size_t ZSTD_CCtx_setParametersUsingCCtxParams (ZSTD_CCtx *cctx, const ZSTD_CCtx_params *params)
 
size_t ZSTD_CCtx_setCParams (ZSTD_CCtx *cctx, ZSTD_compressionParameters cparams)
 
size_t ZSTD_CCtx_setFParams (ZSTD_CCtx *cctx, ZSTD_frameParameters fparams)
 
size_t ZSTD_CCtx_setParams (ZSTD_CCtx *cctx, ZSTD_parameters params)
 
size_t ZSTD_CCtx_setPledgedSrcSize (ZSTD_CCtx *cctx, unsigned long long pledgedSrcSize)
 
size_t ZSTD_CCtx_loadDictionary_advanced (ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
 
size_t ZSTD_CCtx_loadDictionary_byReference (ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
 
size_t ZSTD_CCtx_loadDictionary (ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
 
size_t ZSTD_CCtx_refCDict (ZSTD_CCtx *cctx, const ZSTD_CDict *cdict)
 
size_t ZSTD_CCtx_refThreadPool (ZSTD_CCtx *cctx, ZSTD_threadPool *pool)
 
size_t ZSTD_CCtx_refPrefix (ZSTD_CCtx *cctx, const void *prefix, size_t prefixSize)
 
size_t ZSTD_CCtx_refPrefix_advanced (ZSTD_CCtx *cctx, const void *prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType)
 
size_t ZSTD_CCtx_reset (ZSTD_CCtx *cctx, ZSTD_ResetDirective reset)
 
size_t ZSTD_checkCParams (ZSTD_compressionParameters cParams)
 
U32 ZSTD_cycleLog (U32 hashLog, ZSTD_strategy strat)
 
ZSTD_compressionParameters ZSTD_adjustCParams (ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize)
 
ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams (const ZSTD_CCtx_params *CCtxParams, U64 srcSizeHint, size_t dictSize, ZSTD_cParamMode_e mode)
 
size_t ZSTD_estimateCCtxSize_usingCCtxParams (const ZSTD_CCtx_params *params)
 
size_t ZSTD_estimateCCtxSize_usingCParams (ZSTD_compressionParameters cParams)
 
size_t ZSTD_estimateCCtxSize (int compressionLevel)
 
size_t ZSTD_estimateCStreamSize_usingCCtxParams (const ZSTD_CCtx_params *params)
 
size_t ZSTD_estimateCStreamSize_usingCParams (ZSTD_compressionParameters cParams)
 
size_t ZSTD_estimateCStreamSize (int compressionLevel)
 
ZSTD_frameProgression ZSTD_getFrameProgression (const ZSTD_CCtx *cctx)
 
size_t ZSTD_toFlushNow (ZSTD_CCtx *cctx)
 
void ZSTD_reset_compressedBlockState (ZSTD_compressedBlockState_t *bs)
 
void ZSTD_invalidateRepCodes (ZSTD_CCtx *cctx)
 
size_t ZSTD_copyCCtx (ZSTD_CCtx *dstCCtx, const ZSTD_CCtx *srcCCtx, unsigned long long pledgedSrcSize)
 
FORCE_INLINE_TEMPLATE void ZSTD_reduceTable_internal (U32 *const table, U32 const size, U32 const reducerValue, int const preserveMark)
 
int ZSTD_seqToCodes (const seqStore_t *seqStorePtr)
 
MEM_STATIC size_t ZSTD_entropyCompressSeqStore_internal (const seqStore_t *seqStorePtr, const ZSTD_entropyCTables_t *prevEntropy, ZSTD_entropyCTables_t *nextEntropy, const ZSTD_CCtx_params *cctxParams, void *dst, size_t dstCapacity, void *entropyWorkspace, size_t entropyWkspSize, const int bmi2)
 
MEM_STATIC size_t ZSTD_entropyCompressSeqStore (const seqStore_t *seqStorePtr, const ZSTD_entropyCTables_t *prevEntropy, ZSTD_entropyCTables_t *nextEntropy, const ZSTD_CCtx_params *cctxParams, void *dst, size_t dstCapacity, size_t srcSize, void *entropyWorkspace, size_t entropyWkspSize, int bmi2)
 
ZSTD_blockCompressor ZSTD_selectBlockCompressor (ZSTD_strategy strat, ZSTD_paramSwitch_e useRowMatchFinder, ZSTD_dictMode_e dictMode)
 
void ZSTD_resetSeqStore (seqStore_t *ssPtr)
 
size_t ZSTD_sequenceBound (size_t srcSize)
 
size_t ZSTD_generateSequences (ZSTD_CCtx *zc, ZSTD_Sequence *outSeqs, size_t outSeqsSize, const void *src, size_t srcSize)
 
size_t ZSTD_mergeBlockDelimiters (ZSTD_Sequence *sequences, size_t seqsSize)
 
size_t ZSTD_buildBlockEntropyStats (const seqStore_t *seqStorePtr, const ZSTD_entropyCTables_t *prevEntropy, ZSTD_entropyCTables_t *nextEntropy, const ZSTD_CCtx_params *cctxParams, ZSTD_entropyCTablesMetadata_t *entropyMetadata, void *workspace, size_t wkspSize)
 
size_t ZSTD_writeSkippableFrame (void *dst, size_t dstCapacity, const void *src, size_t srcSize, unsigned magicVariant)
 
size_t ZSTD_writeLastEmptyBlock (void *dst, size_t dstCapacity)
 
void ZSTD_referenceExternalSequences (ZSTD_CCtx *cctx, rawSeq *seq, size_t nbSeq)
 
size_t ZSTD_compressContinue_public (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_compressContinue (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_getBlockSize (const ZSTD_CCtx *cctx)
 
size_t ZSTD_compressBlock_deprecated (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_compressBlock (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_loadCEntropy (ZSTD_compressedBlockState_t *bs, void *workspace, const void *const dict, size_t dictSize)
 
size_t ZSTD_compressBegin_advanced_internal (ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, ZSTD_dictTableLoadMethod_e dtlm, const ZSTD_CDict *cdict, const ZSTD_CCtx_params *params, unsigned long long pledgedSrcSize)
 
size_t ZSTD_compressBegin_advanced (ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize)
 
size_t ZSTD_compressBegin_usingDict (ZSTD_CCtx *cctx, const void *dict, size_t dictSize, int compressionLevel)
 
size_t ZSTD_compressBegin (ZSTD_CCtx *cctx, int compressionLevel)
 
void ZSTD_CCtx_trace (ZSTD_CCtx *cctx, size_t extraCSize)
 
size_t ZSTD_compressEnd_public (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_compressEnd (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_compress_advanced (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize, ZSTD_parameters params)
 
size_t ZSTD_compress_advanced_internal (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize, const ZSTD_CCtx_params *params)
 
size_t ZSTD_compress_usingDict (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize, int compressionLevel)
 
size_t ZSTD_compressCCtx (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, int compressionLevel)
 
size_t ZSTD_compress (void *dst, size_t dstCapacity, const void *src, size_t srcSize, int compressionLevel)
 
size_t ZSTD_estimateCDictSize_advanced (size_t dictSize, ZSTD_compressionParameters cParams, ZSTD_dictLoadMethod_e dictLoadMethod)
 
size_t ZSTD_estimateCDictSize (size_t dictSize, int compressionLevel)
 
size_t ZSTD_sizeof_CDict (const ZSTD_CDict *cdict)
 
ZSTD_CDictZSTD_createCDict_advanced (const void *dictBuffer, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_compressionParameters cParams, ZSTD_customMem customMem)
 
ZSTD_CDictZSTD_createCDict_advanced2 (const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, const ZSTD_CCtx_params *originalCctxParams, ZSTD_customMem customMem)
 
ZSTD_CDictZSTD_createCDict (const void *dict, size_t dictSize, int compressionLevel)
 
ZSTD_CDictZSTD_createCDict_byReference (const void *dict, size_t dictSize, int compressionLevel)
 
size_t ZSTD_freeCDict (ZSTD_CDict *cdict)
 
const ZSTD_CDictZSTD_initStaticCDict (void *workspace, size_t workspaceSize, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_compressionParameters cParams)
 
ZSTD_compressionParameters ZSTD_getCParamsFromCDict (const ZSTD_CDict *cdict)
 
unsigned ZSTD_getDictID_fromCDict (const ZSTD_CDict *cdict)
 
size_t ZSTD_compressBegin_usingCDict_advanced (ZSTD_CCtx *const cctx, const ZSTD_CDict *const cdict, ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize)
 
size_t ZSTD_compressBegin_usingCDict_deprecated (ZSTD_CCtx *cctx, const ZSTD_CDict *cdict)
 
size_t ZSTD_compressBegin_usingCDict (ZSTD_CCtx *cctx, const ZSTD_CDict *cdict)
 
size_t ZSTD_compress_usingCDict_advanced (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_CDict *cdict, ZSTD_frameParameters fParams)
 
size_t ZSTD_compress_usingCDict (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_CDict *cdict)
 
ZSTD_CStreamZSTD_createCStream (void)
 
ZSTD_CStreamZSTD_initStaticCStream (void *workspace, size_t workspaceSize)
 
ZSTD_CStreamZSTD_createCStream_advanced (ZSTD_customMem customMem)
 
size_t ZSTD_freeCStream (ZSTD_CStream *zcs)
 
size_t ZSTD_CStreamInSize (void)
 
size_t ZSTD_CStreamOutSize (void)
 
size_t ZSTD_resetCStream (ZSTD_CStream *zcs, unsigned long long pss)
 
size_t ZSTD_initCStream_internal (ZSTD_CStream *zcs, const void *dict, size_t dictSize, const ZSTD_CDict *cdict, const ZSTD_CCtx_params *params, unsigned long long pledgedSrcSize)
 
size_t ZSTD_initCStream_usingCDict_advanced (ZSTD_CStream *zcs, const ZSTD_CDict *cdict, ZSTD_frameParameters fParams, unsigned long long pledgedSrcSize)
 
size_t ZSTD_initCStream_usingCDict (ZSTD_CStream *zcs, const ZSTD_CDict *cdict)
 
size_t ZSTD_initCStream_advanced (ZSTD_CStream *zcs, const void *dict, size_t dictSize, ZSTD_parameters params, unsigned long long pss)
 
size_t ZSTD_initCStream_usingDict (ZSTD_CStream *zcs, const void *dict, size_t dictSize, int compressionLevel)
 
size_t ZSTD_initCStream_srcSize (ZSTD_CStream *zcs, int compressionLevel, unsigned long long pss)
 
size_t ZSTD_initCStream (ZSTD_CStream *zcs, int compressionLevel)
 
size_t ZSTD_compressStream (ZSTD_CStream *zcs, ZSTD_outBuffer *output, ZSTD_inBuffer *input)
 
size_t ZSTD_compressStream2 (ZSTD_CCtx *cctx, ZSTD_outBuffer *output, ZSTD_inBuffer *input, ZSTD_EndDirective endOp)
 
size_t ZSTD_compressStream2_simpleArgs (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, size_t *dstPos, const void *src, size_t srcSize, size_t *srcPos, ZSTD_EndDirective endOp)
 
size_t ZSTD_compress2 (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_copySequencesToSeqStoreExplicitBlockDelim (ZSTD_CCtx *cctx, ZSTD_sequencePosition *seqPos, const ZSTD_Sequence *const inSeqs, size_t inSeqsSize, const void *src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch)
 
size_t ZSTD_copySequencesToSeqStoreNoBlockDelim (ZSTD_CCtx *cctx, ZSTD_sequencePosition *seqPos, const ZSTD_Sequence *const inSeqs, size_t inSeqsSize, const void *src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch)
 
size_t ZSTD_compressSequences (ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const ZSTD_Sequence *inSeqs, size_t inSeqsSize, const void *src, size_t srcSize)
 
size_t ZSTD_flushStream (ZSTD_CStream *zcs, ZSTD_outBuffer *output)
 
size_t ZSTD_endStream (ZSTD_CStream *zcs, ZSTD_outBuffer *output)
 
int ZSTD_maxCLevel (void)
 
int ZSTD_minCLevel (void)
 
int ZSTD_defaultCLevel (void)
 
ZSTD_compressionParameters ZSTD_getCParams (int compressionLevel, unsigned long long srcSizeHint, size_t dictSize)
 
ZSTD_parameters ZSTD_getParams (int compressionLevel, unsigned long long srcSizeHint, size_t dictSize)
 
void ZSTD_registerSequenceProducer (ZSTD_CCtx *zc, void *extSeqProdState, ZSTD_sequenceProducer_F extSeqProdFunc)
 
void ZSTD_CCtxParams_registerSequenceProducer (ZSTD_CCtx_params *params, void *extSeqProdState, ZSTD_sequenceProducer_F extSeqProdFunc)
 

Macro Definition Documentation

◆ BOUNDCHECK

#define BOUNDCHECK (   cParam,
  val 
)
Value:
do { \
RETURN_ERROR_IF(!ZSTD_cParam_withinBounds(cParam,val), \
parameter_outOfBound, "Param out of bounds"); \
} while (0)
MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value)

Definition at line 653 of file zstd_compress.c.

◆ CLAMP

#define CLAMP (   cParam,
  val 
)    CLAMP_TYPE(cParam, val, unsigned)

◆ CLAMP_TYPE

#define CLAMP_TYPE (   cParam,
  val,
  type 
)
Value:
do { \
ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); \
if ((int)val<bounds.lowerBound) val=(type)bounds.lowerBound; \
else if ((int)val>bounds.upperBound) val=(type)bounds.upperBound; \
} while (0)
int lowerBound
Definition: zstd.h:523
ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param)

◆ COMPRESS_LITERALS_SIZE_MIN

#define COMPRESS_LITERALS_SIZE_MIN   63 /* heuristic */

◆ FSE_STATIC_LINKING_ONLY

#define FSE_STATIC_LINKING_ONLY   /* FSE_encodeSymbol */

Definition at line 18 of file zstd_compress.c.

◆ MIN_SEQUENCES_BLOCK_SPLITTING

#define MIN_SEQUENCES_BLOCK_SPLITTING   300

Definition at line 4116 of file zstd_compress.c.

◆ SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO

#define SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO   20

Definition at line 2874 of file zstd_compress.c.

◆ ZSTD_COMPRESS_HEAPMODE

#define ZSTD_COMPRESS_HEAPMODE   0

COMPRESS_HEAPMODE : Select how default decompression function ZSTD_compress() allocates its context, on stack (0, default), or into heap (1). Note that functions with explicit context such as ZSTD_compressCCtx() are unaffected.

Definition at line 42 of file zstd_compress.c.

◆ ZSTD_HASHLOG3_MAX

#define ZSTD_HASHLOG3_MAX   17

ZSTD_HASHLOG3_MAX : Maximum size of the hash table dedicated to find 3-bytes matches, in log format, aka 17 => 1 << 17 == 128Ki positions. This structure is only used in zstd_opt. Since allocation is centralized for all strategies, it has to be known here. The actual (selected) size of the hash table is then stored in ZSTD_matchState_t.hashLog3, so that zstd_opt.c doesn't need to know about this constant.

Definition at line 55 of file zstd_compress.c.

◆ ZSTD_INDEXOVERFLOW_MARGIN

#define ZSTD_INDEXOVERFLOW_MARGIN   (16 MB)

Definition at line 2068 of file zstd_compress.c.

◆ ZSTD_NO_CLEVEL

#define ZSTD_NO_CLEVEL   0

Definition at line 373 of file zstd_compress.c.

◆ ZSTD_ROWSIZE

#define ZSTD_ROWSIZE   16

Definition at line 2593 of file zstd_compress.c.

◆ ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER

#define ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER   (6ULL)

Definition at line 5108 of file zstd_compress.c.

◆ ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF

#define ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF   (128 KB)

Definition at line 5107 of file zstd_compress.c.

Typedef Documentation

◆ ZSTD_sequenceCopier

typedef size_t(* ZSTD_sequenceCopier) (ZSTD_CCtx *cctx, ZSTD_sequencePosition *seqPos, const ZSTD_Sequence *const inSeqs, size_t inSeqsSize, const void *src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch)

Definition at line 6714 of file zstd_compress.c.

Enumeration Type Documentation

◆ ZSTD_buildSeqStore_e

Enumerator
ZSTDbss_compress 
ZSTDbss_noCompress 

Definition at line 3200 of file zstd_compress.c.

◆ ZSTD_compResetPolicy_e

Controls, for this matchState reset, whether the tables need to be cleared / prepared for the coming compression (ZSTDcrp_makeClean), or whether the tables can be left unclean (ZSTDcrp_leaveDirty), because we know that a subsequent operation will overwrite the table space anyways (e.g., copying the matchState contents in from a CDict).

Enumerator
ZSTDcrp_makeClean 
ZSTDcrp_leaveDirty 

Definition at line 1940 of file zstd_compress.c.

◆ ZSTD_indexResetPolicy_e

Controls, for this matchState reset, whether indexing can continue where it left off (ZSTDirp_continue), or whether it needs to be restarted from zero (ZSTDirp_reset).

Enumerator
ZSTDirp_continue 
ZSTDirp_reset 

Definition at line 1950 of file zstd_compress.c.

◆ ZSTD_resetTarget_e

Enumerator
ZSTD_resetTarget_CDict 
ZSTD_resetTarget_CCtx 

Definition at line 1955 of file zstd_compress.c.

Function Documentation

◆ ZSTD_adjustCParams()

ZSTD_compressionParameters ZSTD_adjustCParams ( ZSTD_compressionParameters  cPar,
unsigned long long  srcSize,
size_t  dictSize 
)

Definition at line 1603 of file zstd_compress.c.

◆ ZSTD_buildBlockEntropyStats()

size_t ZSTD_buildBlockEntropyStats ( const seqStore_t seqStorePtr,
const ZSTD_entropyCTables_t prevEntropy,
ZSTD_entropyCTables_t nextEntropy,
const ZSTD_CCtx_params *  cctxParams,
ZSTD_entropyCTablesMetadata_t entropyMetadata,
void *  workspace,
size_t  wkspSize 
)

ZSTD_buildBlockEntropyStats() : Builds entropy for the block. Requires workspace size ENTROPY_WORKSPACE_SIZE

Returns
: 0 on success, or an error code Note : also employed in superblock

Definition at line 3734 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_getParameter()

size_t ZSTD_CCtx_getParameter ( ZSTD_CCtx const *  cctx,
ZSTD_cParameter  param,
int *  value 
)

Definition at line 1017 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_loadDictionary()

size_t ZSTD_CCtx_loadDictionary ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize 
)

ZSTD_CCtx_loadDictionary() : Requires v1.4.0+ Create an internal CDict from dict buffer. Decompression will have to use same dictionary.

Returns
: 0, or an error code (which can be tested with ZSTD_isError()). Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary, meaning "return to no-dictionary mode". Note 1 : Dictionary is sticky, it will be used for all future compressed frames, until parameters are reset, a new dictionary is loaded, or the dictionary is explicitly invalidated by loading a NULL dictionary. Note 2 : Loading a dictionary involves building tables. It's also a CPU consuming operation, with non-negligible impact on latency. Tables are dependent on compression parameters, and for this reason, compression parameters can no longer be changed after loading a dictionary. Note 3 :dict content will be copied internally. Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. In such a case, dictionary buffer must outlive its users. Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() to precisely select how dictionary content must be interpreted. Note 5 : This method does not benefit from LDM (long distance mode). If you want to employ LDM on some large dictionary content, prefer employing ZSTD_CCtx_refPrefix() described below.

Definition at line 1312 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_loadDictionary_advanced()

size_t ZSTD_CCtx_loadDictionary_advanced ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType 
)

Definition at line 1274 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_loadDictionary_byReference()

size_t ZSTD_CCtx_loadDictionary_byReference ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize 
)

Definition at line 1305 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_CCtx_refCDict()

size_t ZSTD_CCtx_refCDict ( ZSTD_CCtx cctx,
const ZSTD_CDict cdict 
)

ZSTD_CCtx_refCDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used for all future compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx.

Returns
: 0, or an error code (which can be tested with ZSTD_isError()). Special : Referencing a NULL CDict means "return to no-dictionary mode". Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively "discards" any previous one. Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.

Definition at line 1319 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtx_refPrefix()

size_t ZSTD_CCtx_refPrefix ( ZSTD_CCtx cctx,
const void *  prefix,
size_t  prefixSize 
)

ZSTD_CCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) for next compressed frame. A prefix is only used once. Tables are discarded at end of frame (ZSTD_e_end). Decompression will need same prefix to properly regenerate data. Compressing with a prefix is similar in outcome as performing a diff and compressing it, but performs much faster, especially during decompression (compression speed is tunable with compression level). This method is compatible with LDM (long distance mode).

Returns
: 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. Its content must remain unmodified during compression. Note 2 : If the intention is to diff some large src data blob with some prior version of itself, ensure that the window size is large enough to contain the entire source. See ZSTD_c_windowLog. Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters. It's a CPU consuming operation, with non-negligible impact on latency. If there is a need to use the same prefix multiple times, consider loadDictionary instead. Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent). Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation.

Definition at line 1337 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_CCtx_refPrefix_advanced()

size_t ZSTD_CCtx_refPrefix_advanced ( ZSTD_CCtx cctx,
const void *  prefix,
size_t  prefixSize,
ZSTD_dictContentType_e  dictContentType 
)

Definition at line 1342 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtx_refThreadPool()

size_t ZSTD_CCtx_refThreadPool ( ZSTD_CCtx cctx,
ZSTD_threadPool *  pool 
)

Definition at line 1329 of file zstd_compress.c.

◆ ZSTD_CCtx_reset()

size_t ZSTD_CCtx_reset ( ZSTD_CCtx cctx,
ZSTD_ResetDirective  reset 
)

ZSTD_CCtx_reset() : Also dumps dictionary

Definition at line 1358 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_setCParams()

size_t ZSTD_CCtx_setCParams ( ZSTD_CCtx cctx,
ZSTD_compressionParameters  cparams 
)

Definition at line 1183 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_setFParams()

size_t ZSTD_CCtx_setFParams ( ZSTD_CCtx cctx,
ZSTD_frameParameters  fparams 
)

Definition at line 1199 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_setParameter()

size_t ZSTD_CCtx_setParameter ( ZSTD_CCtx cctx,
ZSTD_cParameter  param,
int  value 
)

ZSTD_CCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_cParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is generally only possible during frame initialization (before starting compression). Exception : when using multi-threading mode (nbWorkers >= 1), the following parameters can be updated during compression (within same frame): => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. new parameters will be active for next job only (after a flush()).

Returns
: an error code (which can be tested using ZSTD_isError()).

Definition at line 709 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtx_setParametersUsingCCtxParams()

size_t ZSTD_CCtx_setParametersUsingCCtxParams ( ZSTD_CCtx cctx,
const ZSTD_CCtx_params *  params 
)

ZSTD_CCtx_setParametersUsingCCtxParams() : just applies params into cctx no action is performed, parameters are merely stored. If ZSTDMT is enabled, parameters are pushed to cctx->mtctx. This is possible even if a compression is ongoing. In which case, new parameters will be applied on the fly, starting with next compression job.

Definition at line 1169 of file zstd_compress.c.

◆ ZSTD_CCtx_setParams()

size_t ZSTD_CCtx_setParams ( ZSTD_CCtx cctx,
ZSTD_parameters  params 
)

Definition at line 1209 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_CCtx_setPledgedSrcSize()

size_t ZSTD_CCtx_setPledgedSrcSize ( ZSTD_CCtx cctx,
unsigned long long  pledgedSrcSize 
)

ZSTD_CCtx_setPledgedSrcSize() : Total input data size to be compressed as a single frame. Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. This value will also be controlled at end of frame, and trigger an error if not respected.

Returns
: 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame. In order to mean "unknown content size", pass constant ZSTD_CONTENTSIZE_UNKNOWN. ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame. Note 2 : pledgedSrcSize is only valid once, for the next frame. It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN. Note 3 : Whenever all input data is provided and consumed in a single round, for example with ZSTD_compress2(), or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end), this value is automatically overridden by srcSize instead.

Definition at line 1221 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtx_trace()

void ZSTD_CCtx_trace ( ZSTD_CCtx cctx,
size_t  extraCSize 
)

ZSTD_CCtx_trace() : Trace the end of a compression call.

Definition at line 5258 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtxParams_getParameter()

size_t ZSTD_CCtxParams_getParameter ( ZSTD_CCtx_params const *  CCtxParams,
ZSTD_cParameter  param,
int *  value 
)

Definition at line 1022 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtxParams_init()

size_t ZSTD_CCtxParams_init ( ZSTD_CCtx_params *  cctxParams,
int  compressionLevel 
)

Definition at line 365 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtxParams_init_advanced()

size_t ZSTD_CCtxParams_init_advanced ( ZSTD_CCtx_params *  cctxParams,
ZSTD_parameters  params 
)

Definition at line 402 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_CCtxParams_registerSequenceProducer()

void ZSTD_CCtxParams_registerSequenceProducer ( ZSTD_CCtx_params *  params,
void *  extSeqProdState,
ZSTD_sequenceProducer_F  extSeqProdFunc 
)

Definition at line 7140 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_CCtxParams_reset()

size_t ZSTD_CCtxParams_reset ( ZSTD_CCtx_params *  params)

Definition at line 360 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CCtxParams_setParameter()

size_t ZSTD_CCtxParams_setParameter ( ZSTD_CCtx_params *  CCtxParams,
ZSTD_cParameter  param,
int  value 
)

Definition at line 770 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_checkCParams()

size_t ZSTD_checkCParams ( ZSTD_compressionParameters  cParams)

ZSTD_checkCParams() : control CParam values remain within authorized range.

Returns
: 0, or an error code if one value is beyond authorized range

Definition at line 1379 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compress()

size_t ZSTD_compress ( void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
int  compressionLevel 
)

ZSTD_compress() : Compresses src content as a single zstd compressed frame into already allocated dst. NOTE: Providing dstCapacity >= ZSTD_compressBound(srcSize) guarantees that zstd will have enough space to successfully compress the data.

Returns
: compressed size written into dst (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).

Definition at line 5372 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compress2()

size_t ZSTD_compress2 ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

ZSTD_compress2() : Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. (note that this entry point doesn't even expose a compression level parameter). ZSTD_compress2() always starts a new frame. Should cctx hold data from a previously unfinished frame, everything about it is forgotten.

  • Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
  • The function is always blocking, returns when compression is completed. NOTE: Providing dstCapacity >= ZSTD_compressBound(srcSize) guarantees that zstd will have enough space to successfully compress the data, though it is possible it fails for other reasons.
    Returns
    : compressed size written into dst (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).

Definition at line 6435 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compress_advanced()

size_t ZSTD_compress_advanced ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const void *  dict,
size_t  dictSize,
ZSTD_parameters  params 
)

Definition at line 5316 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compress_advanced_internal()

size_t ZSTD_compress_advanced_internal ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const void *  dict,
size_t  dictSize,
const ZSTD_CCtx_params *  params 
)

Definition at line 5333 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compress_usingCDict()

size_t ZSTD_compress_usingCDict ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const ZSTD_CDict cdict 
)

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 parameters are decided at CDict creation time while frame parameters are hardcoded

Definition at line 5785 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compress_usingCDict_advanced()

size_t ZSTD_compress_usingCDict_advanced ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const ZSTD_CDict cdict,
ZSTD_frameParameters  fParams 
)

ZSTD_compress_usingCDict_advanced(): This function is DEPRECATED.

Definition at line 5772 of file zstd_compress.c.

◆ ZSTD_compress_usingDict()

size_t ZSTD_compress_usingDict ( ZSTD_CCtx ctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const void *  dict,
size_t  dictSize,
int  compressionLevel 
)

ZSTD_compress_usingDict() : Compression at an explicit compression level using a Dictionary. A dictionary can be any arbitrary data segment (also called a prefix), or a buffer with specified information (see zdict.h). Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note 2 : When dict == NULL || dictSize < 8 no dictionary is used.

Definition at line 5347 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compressBegin()

size_t ZSTD_compressBegin ( ZSTD_CCtx cctx,
int  compressionLevel 
)

Definition at line 5210 of file zstd_compress.c.

◆ ZSTD_compressBegin_advanced()

size_t ZSTD_compressBegin_advanced ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize,
ZSTD_parameters  params,
unsigned long long  pledgedSrcSize 
)

ZSTD_compressBegin_advanced() :

Returns
: 0, or an error code

Definition at line 5180 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressBegin_advanced_internal()

size_t ZSTD_compressBegin_advanced_internal ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize,
ZSTD_dictContentType_e  dictContentType,
ZSTD_dictTableLoadMethod_e  dtlm,
const ZSTD_CDict cdict,
const ZSTD_CCtx_params *  params,
unsigned long long  pledgedSrcSize 
)

Definition at line 5160 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compressBegin_usingCDict()

size_t ZSTD_compressBegin_usingCDict ( ZSTD_CCtx cctx,
const ZSTD_CDict cdict 
)

Definition at line 5752 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressBegin_usingCDict_advanced()

size_t ZSTD_compressBegin_usingCDict_advanced ( ZSTD_CCtx *const  cctx,
const ZSTD_CDict *const  cdict,
ZSTD_frameParameters const  fParams,
unsigned long long const  pledgedSrcSize 
)

Definition at line 5737 of file zstd_compress.c.

◆ ZSTD_compressBegin_usingCDict_deprecated()

size_t ZSTD_compressBegin_usingCDict_deprecated ( ZSTD_CCtx cctx,
const ZSTD_CDict cdict 
)

Definition at line 5746 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compressBegin_usingDict()

size_t ZSTD_compressBegin_usingDict ( ZSTD_CCtx cctx,
const void *  dict,
size_t  dictSize,
int  compressionLevel 
)

Definition at line 5205 of file zstd_compress.c.

◆ ZSTD_compressBlock()

size_t ZSTD_compressBlock ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 4771 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressBlock_deprecated()

size_t ZSTD_compressBlock_deprecated ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 4761 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compressBound()

size_t ZSTD_compressBound ( size_t  srcSize)

maximum compressed size in worst case single-pass scenario

Definition at line 69 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compressCCtx()

size_t ZSTD_compressCCtx ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
int  compressionLevel 
)

ZSTD_compressCCtx() : Same as ZSTD_compress(), using an explicit ZSTD_CCtx. Important : in order to mirror ZSTD_compress() behavior, this function compresses at the requested compression level, ignoring any other advanced parameter . If any advanced parameter was set using the advanced API, they will all be reset. Only compressionLevel remains.

Definition at line 5362 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compressContinue()

size_t ZSTD_compressContinue ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 4740 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressContinue_public()

size_t ZSTD_compressContinue_public ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 4731 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_compressEnd()

size_t ZSTD_compressEnd ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 5309 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressEnd_public()

size_t ZSTD_compressEnd_public ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 5282 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compressSequences()

size_t ZSTD_compressSequences ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
const ZSTD_Sequence *  inSeqs,
size_t  inSeqsSize,
const void *  src,
size_t  srcSize 
)

Definition at line 6905 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressStream()

size_t ZSTD_compressStream ( ZSTD_CStream zcs,
ZSTD_outBuffer output,
ZSTD_inBuffer input 
)

Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue). NOTE: The return value is different. ZSTD_compressStream() returns a hint for the next read size (if non-zero and not an error). ZSTD_compressStream2() returns the minimum nb of bytes left to flush (if non-zero and not an error).

Definition at line 6173 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_compressStream2()

size_t ZSTD_compressStream2 ( ZSTD_CCtx cctx,
ZSTD_outBuffer output,
ZSTD_inBuffer input,
ZSTD_EndDirective  endOp 
)

ZSTD_compressStream2() : Requires v1.4.0+ Behaves about the same as ZSTD_compressStream, with additional control on end directive.

  • Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*()
  • Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode)
  • output->pos must be <= dstCapacity, input->pos must be <= srcSize
  • output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit.
  • endOp must be a valid directive
  • When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller.
  • When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available, and then immediately returns, just indicating that there is some data remaining to be flushed. The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte.
  • Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking.
  • Returns
    provides a minimum amount of data remaining to be flushed from internal buffers or an error code, which can be tested using ZSTD_isError(). if
    != 0, flush is not fully completed, there is still some data left within internal buffers. This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers. For ZSTD_e_end,
    == 0 when internal buffers are fully flushed and frame is completed.
  • after a ZSTD_e_end directive, if internal buffer is not fully flushed (
    Returns
    != 0), only ZSTD_e_end or ZSTD_e_flush operations are allowed. Before starting a new compression job, or changing compression parameters, it is required to fully flush internal buffers.
  • note: if an operation ends with an error, it may leave @cctx in an undefined state. Therefore, it's UB to invoke ZSTD_compressStream2() of ZSTD_compressStream() on such a state. In order to be re-employed after an error, a state must be reset, which can be done explicitly (ZSTD_CCtx_reset()), or is sometimes implied by methods starting a new compression job (ZSTD_initCStream(), ZSTD_compressCCtx())

Definition at line 6314 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_compressStream2_simpleArgs()

size_t ZSTD_compressStream2_simpleArgs ( ZSTD_CCtx cctx,
void *  dst,
size_t  dstCapacity,
size_t *  dstPos,
const void *  src,
size_t  srcSize,
size_t *  srcPos,
ZSTD_EndDirective  endOp 
)

Definition at line 6413 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_copyCCtx()

size_t ZSTD_copyCCtx ( ZSTD_CCtx dstCCtx,
const ZSTD_CCtx srcCCtx,
unsigned long long  pledgedSrcSize 
)

ZSTD_copyCCtx() : Duplicate an existing context srcCCtx into another one dstCCtx. Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()). pledgedSrcSize==0 means "unknown".

Returns
: 0, or an error code

Definition at line 2579 of file zstd_compress.c.

◆ ZSTD_copySequencesToSeqStoreExplicitBlockDelim()

size_t ZSTD_copySequencesToSeqStoreExplicitBlockDelim ( ZSTD_CCtx cctx,
ZSTD_sequencePosition seqPos,
const ZSTD_Sequence *const  inSeqs,
size_t  inSeqsSize,
const void *  src,
size_t  blockSize,
ZSTD_paramSwitch_e  externalRepSearch 
)

Definition at line 6506 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_copySequencesToSeqStoreNoBlockDelim()

size_t ZSTD_copySequencesToSeqStoreNoBlockDelim ( ZSTD_CCtx cctx,
ZSTD_sequencePosition seqPos,
const ZSTD_Sequence *const  inSeqs,
size_t  inSeqsSize,
const void *  src,
size_t  blockSize,
ZSTD_paramSwitch_e  externalRepSearch 
)

Definition at line 6592 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_cParam_getBounds()

ZSTD_bounds ZSTD_cParam_getBounds ( ZSTD_cParameter  cParam)

ZSTD_cParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped.

Returns
: a structure, ZSTD_bounds, which contains
  • an error status field, which must be tested using ZSTD_isError()
  • lower and upper bounds, both inclusive

Definition at line 426 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_createCCtx()

ZSTD_CCtx * ZSTD_createCCtx ( void  )

Definition at line 96 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createCCtx_advanced()

ZSTD_CCtx * ZSTD_createCCtx_advanced ( ZSTD_customMem  customMem)

Definition at line 113 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createCCtxParams()

ZSTD_CCtx_params * ZSTD_createCCtxParams ( void  )

Definition at line 348 of file zstd_compress.c.

◆ ZSTD_createCDict()

ZSTD_CDict * ZSTD_createCDict ( const void *  dictBuffer,
size_t  dictSize,
int  compressionLevel 
)

ZSTD_createCDict() : When compressing multiple messages or blocks using the same dictionary, it's recommended to digest the dictionary only once, since it's a costly operation. ZSTD_createCDict() will create a state from digesting a dictionary. The resulting state can be used for future compression operations with very limited startup cost. ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. Note 1 : Consider experimental function ZSTD_createCDict_byReference() if you prefer to not duplicate @dictBuffer content. Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, in which case the only thing that it transports is the @compressionLevel. This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, expecting a ZSTD_CDict parameter with any data, including those without a known dictionary.

Definition at line 5582 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createCDict_advanced()

ZSTD_CDict * ZSTD_createCDict_advanced ( const void *  dictBuffer,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType,
ZSTD_compressionParameters  cParams,
ZSTD_customMem  customMem 
)

Definition at line 5515 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createCDict_advanced2()

ZSTD_CDict * ZSTD_createCDict_advanced2 ( const void *  dict,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType,
const ZSTD_CCtx_params *  originalCctxParams,
ZSTD_customMem  customMem 
)

Definition at line 5532 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createCDict_byReference()

ZSTD_CDict * ZSTD_createCDict_byReference ( const void *  dict,
size_t  dictSize,
int  compressionLevel 
)

Definition at line 5593 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_createCStream()

ZSTD_CStream * ZSTD_createCStream ( void  )

Definition at line 5800 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_createCStream_advanced()

ZSTD_CStream * ZSTD_createCStream_advanced ( ZSTD_customMem  customMem)

Definition at line 5811 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_CStreamInSize()

size_t ZSTD_CStreamInSize ( void  )

recommended size for input buffer

Definition at line 5825 of file zstd_compress.c.

◆ ZSTD_CStreamOutSize()

size_t ZSTD_CStreamOutSize ( void  )

recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block.

Definition at line 5827 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_cycleLog()

U32 ZSTD_cycleLog ( U32  hashLog,
ZSTD_strategy  strat 
)

ZSTD_cycleLog() : condition for correct operation : hashLog > 1

Definition at line 1416 of file zstd_compress.c.

◆ ZSTD_defaultCLevel()

int ZSTD_defaultCLevel ( void  )

default compression level, specified by ZSTD_CLEVEL_DEFAULT, requires v1.5.0+

Definition at line 6988 of file zstd_compress.c.

◆ ZSTD_endStream()

size_t ZSTD_endStream ( ZSTD_CStream zcs,
ZSTD_outBuffer output 
)

Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).

Definition at line 6967 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_entropyCompressSeqStore()

MEM_STATIC size_t ZSTD_entropyCompressSeqStore ( const seqStore_t seqStorePtr,
const ZSTD_entropyCTables_t prevEntropy,
ZSTD_entropyCTables_t nextEntropy,
const ZSTD_CCtx_params *  cctxParams,
void *  dst,
size_t  dstCapacity,
size_t  srcSize,
void *  entropyWorkspace,
size_t  entropyWkspSize,
int  bmi2 
)

Definition at line 2996 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_entropyCompressSeqStore_internal()

MEM_STATIC size_t ZSTD_entropyCompressSeqStore_internal ( const seqStore_t seqStorePtr,
const ZSTD_entropyCTables_t prevEntropy,
ZSTD_entropyCTables_t nextEntropy,
const ZSTD_CCtx_params *  cctxParams,
void *  dst,
size_t  dstCapacity,
void *  entropyWorkspace,
size_t  entropyWkspSize,
const int  bmi2 
)

Definition at line 2876 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_estimateCCtxSize()

size_t ZSTD_estimateCCtxSize ( int  compressionLevel)

Definition at line 1789 of file zstd_compress.c.

◆ ZSTD_estimateCCtxSize_usingCCtxParams()

size_t ZSTD_estimateCCtxSize_usingCCtxParams ( const ZSTD_CCtx_params *  params)

Definition at line 1744 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_estimateCCtxSize_usingCParams()

size_t ZSTD_estimateCCtxSize_usingCParams ( ZSTD_compressionParameters  cParams)

Definition at line 1759 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_estimateCDictSize()

size_t ZSTD_estimateCDictSize ( size_t  dictSize,
int  compressionLevel 
)

Definition at line 5411 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_estimateCDictSize_advanced()

size_t ZSTD_estimateCDictSize_advanced ( size_t  dictSize,
ZSTD_compressionParameters  cParams,
ZSTD_dictLoadMethod_e  dictLoadMethod 
)

ZSTD_estimateCDictSize_advanced() : Estimate amount of memory that will be needed to create a dictionary with following arguments

Definition at line 5396 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_estimateCStreamSize()

size_t ZSTD_estimateCStreamSize ( int  compressionLevel)

Definition at line 1844 of file zstd_compress.c.

◆ ZSTD_estimateCStreamSize_usingCCtxParams()

size_t ZSTD_estimateCStreamSize_usingCCtxParams ( const ZSTD_CCtx_params *  params)

Definition at line 1801 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_estimateCStreamSize_usingCParams()

size_t ZSTD_estimateCStreamSize_usingCParams ( ZSTD_compressionParameters  cParams)

Definition at line 1821 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_flushStream()

size_t ZSTD_flushStream ( ZSTD_CStream zcs,
ZSTD_outBuffer output 
)

ZSTD_flushStream() :

Returns
: amount of data remaining to flush

Definition at line 6959 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_freeCCtx()

size_t ZSTD_freeCCtx ( ZSTD_CCtx cctx)

Definition at line 179 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_freeCCtxParams()

size_t ZSTD_freeCCtxParams ( ZSTD_CCtx_params *  params)

Definition at line 353 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_freeCDict()

size_t ZSTD_freeCDict ( ZSTD_CDict CDict)

ZSTD_freeCDict() : Function frees memory allocated by ZSTD_createCDict(). If a NULL pointer is passed, no operation is performed.

Definition at line 5604 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_freeCStream()

size_t ZSTD_freeCStream ( ZSTD_CStream zcs)

Definition at line 5816 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_generateSequences()

size_t ZSTD_generateSequences ( ZSTD_CCtx zc,
ZSTD_Sequence *  outSeqs,
size_t  outSeqsSize,
const void *  src,
size_t  srcSize 
)

Definition at line 3457 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_getBlockSize()

size_t ZSTD_getBlockSize ( const ZSTD_CCtx cctx)

Definition at line 4755 of file zstd_compress.c.

◆ ZSTD_getCParams()

ZSTD_compressionParameters ZSTD_getCParams ( int  compressionLevel,
unsigned long long  srcSizeHint,
size_t  dictSize 
)

ZSTD_getCParams() :

Returns
ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. Size values are optional, provide 0 if not known or unused

Definition at line 7100 of file zstd_compress.c.

◆ ZSTD_getCParamsFromCCtxParams()

ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams ( const ZSTD_CCtx_params *  CCtxParams,
U64  srcSizeHint,
size_t  dictSize,
ZSTD_cParamMode_e  mode 
)

Definition at line 1628 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_getCParamsFromCDict()

ZSTD_compressionParameters ZSTD_getCParamsFromCDict ( const ZSTD_CDict cdict)

ZSTD_getCParamsFromCDict() : as the name implies

Definition at line 5677 of file zstd_compress.c.

◆ ZSTD_getDictID_fromCDict()

unsigned ZSTD_getDictID_fromCDict ( const ZSTD_CDict cdict)

ZSTD_getDictID_fromCDict() : Provides the dictID of the dictionary loaded into cdict. If

Returns
== 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.

Definition at line 5687 of file zstd_compress.c.

◆ ZSTD_getFrameProgression()

ZSTD_frameProgression ZSTD_getFrameProgression ( const ZSTD_CCtx cctx)

Definition at line 1859 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_getParams()

ZSTD_parameters ZSTD_getParams ( int  compressionLevel,
unsigned long long  srcSizeHint,
size_t  dictSize 
)

ZSTD_getParams() : same idea as ZSTD_getCParams()

Returns
a ZSTD_parameters structure (instead of ZSTD_compressionParameters). Fields of ZSTD_frameParameters are set to default values

Definition at line 7124 of file zstd_compress.c.

◆ ZSTD_getSeqStore()

const seqStore_t * ZSTD_getSeqStore ( const ZSTD_CCtx ctx)

Definition at line 220 of file zstd_compress.c.

◆ ZSTD_initCStream()

size_t ZSTD_initCStream ( ZSTD_CStream zcs,
int  compressionLevel 
)

Equivalent to:

ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only);
ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any)
ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel);

Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API to compress with a dictionary.

Definition at line 5950 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_advanced()

size_t ZSTD_initCStream_advanced ( ZSTD_CStream zcs,
const void *  dict,
size_t  dictSize,
ZSTD_parameters  params,
unsigned long long  pss 
)

Definition at line 5908 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_internal()

size_t ZSTD_initCStream_internal ( ZSTD_CStream zcs,
const void *  dict,
size_t  dictSize,
const ZSTD_CDict cdict,
const ZSTD_CCtx_params *  params,
unsigned long long  pledgedSrcSize 
)

ZSTD_initCStream_internal() : Note : for lib/compress only. Used by zstdmt_compress.c. Assumption 1 : params are valid Assumption 2 : either dict, or cdict, is defined, not both

Definition at line 5859 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_srcSize()

size_t ZSTD_initCStream_srcSize ( ZSTD_CStream zcs,
int  compressionLevel,
unsigned long long  pss 
)

Definition at line 5935 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_usingCDict()

size_t ZSTD_initCStream_usingCDict ( ZSTD_CStream zcs,
const ZSTD_CDict cdict 
)

Definition at line 5895 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_usingCDict_advanced()

size_t ZSTD_initCStream_usingCDict_advanced ( ZSTD_CStream zcs,
const ZSTD_CDict cdict,
ZSTD_frameParameters  fParams,
unsigned long long  pledgedSrcSize 
)

Definition at line 5881 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initCStream_usingDict()

size_t ZSTD_initCStream_usingDict ( ZSTD_CStream zcs,
const void *  dict,
size_t  dictSize,
int  compressionLevel 
)

Definition at line 5926 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initStaticCCtx()

ZSTD_CCtx * ZSTD_initStaticCCtx ( void *  workspace,
size_t  workspaceSize 
)

Definition at line 125 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_initStaticCDict()

const ZSTD_CDict * ZSTD_initStaticCDict ( void *  workspace,
size_t  workspaceSize,
const void *  dict,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType,
ZSTD_compressionParameters  cParams 
)

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.

Returns
: 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.

Definition at line 5630 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_initStaticCStream()

ZSTD_CStream * ZSTD_initStaticCStream ( void *  workspace,
size_t  workspaceSize 
)

Definition at line 5806 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_invalidateRepCodes()

void ZSTD_invalidateRepCodes ( ZSTD_CCtx cctx)

Definition at line 2275 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_loadCEntropy()

size_t ZSTD_loadCEntropy ( ZSTD_compressedBlockState_t bs,
void *  workspace,
const void *const  dict,
size_t  dictSize 
)

Definition at line 4936 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_maxCLevel()

int ZSTD_maxCLevel ( void  )

maximum compression level available

Definition at line 6986 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_mergeBlockDelimiters()

size_t ZSTD_mergeBlockDelimiters ( ZSTD_Sequence *  sequences,
size_t  seqsSize 
)

Definition at line 3491 of file zstd_compress.c.

◆ ZSTD_minCLevel()

int ZSTD_minCLevel ( void  )

minimum negative compression level allowed, requires v1.4.0+

Definition at line 6987 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_reduceTable_internal()

FORCE_INLINE_TEMPLATE void ZSTD_reduceTable_internal ( U32 *const  table,
U32 const  size,
U32 const  reducerValue,
int const  preserveMark 
)

ZSTD_reduceTable() : reduce table indexes by reducerValue, or squash to zero. PreserveMark preserves "unsorted mark" for btlazy2 strategy. It must be set to a clear 0/1 value, to remove branch during inlining. Presume table size is a multiple of ZSTD_ROWSIZE to help auto-vectorization

Definition at line 2601 of file zstd_compress.c.

◆ ZSTD_referenceExternalSequences()

void ZSTD_referenceExternalSequences ( ZSTD_CCtx cctx,
rawSeq seq,
size_t  nbSeq 
)

Definition at line 4658 of file zstd_compress.c.

◆ ZSTD_registerSequenceProducer()

void ZSTD_registerSequenceProducer ( ZSTD_CCtx zc,
void *  extSeqProdState,
ZSTD_sequenceProducer_F  extSeqProdFunc 
)

Definition at line 7129 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_reset_compressedBlockState()

void ZSTD_reset_compressedBlockState ( ZSTD_compressedBlockState_t bs)

Definition at line 1908 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_resetCStream()

size_t ZSTD_resetCStream ( ZSTD_CStream zcs,
unsigned long long  pss 
)

Definition at line 5842 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_resetSeqStore()

void ZSTD_resetSeqStore ( seqStore_t ssPtr)

Definition at line 3127 of file zstd_compress.c.

◆ ZSTD_selectBlockCompressor()

ZSTD_blockCompressor ZSTD_selectBlockCompressor ( ZSTD_strategy  strat,
ZSTD_paramSwitch_e  useRowMatchFinder,
ZSTD_dictMode_e  dictMode 
)

Definition at line 3035 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_seqToCodes()

int ZSTD_seqToCodes ( const seqStore_t seqStorePtr)

Definition at line 2681 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_sequenceBound()

size_t ZSTD_sequenceBound ( size_t  srcSize)

Definition at line 3451 of file zstd_compress.c.

Here is the caller graph for this function:

◆ ZSTD_sizeof_CCtx()

size_t ZSTD_sizeof_CCtx ( const ZSTD_CCtx cctx)

ZSTD_sizeof_*() : Requires v1.4.0+ These functions give the current memory usage of selected object. Note that object memory usage can evolve (increase or decrease) over time.

Definition at line 204 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_sizeof_CDict()

size_t ZSTD_sizeof_CDict ( const ZSTD_CDict cdict)

Definition at line 5417 of file zstd_compress.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_sizeof_CStream()

size_t ZSTD_sizeof_CStream ( const ZSTD_CStream zcs)

Definition at line 214 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_toFlushNow()

size_t ZSTD_toFlushNow ( ZSTD_CCtx cctx)

ZSTD_toFlushNow() Only useful for multithreading scenarios currently (nbWorkers >= 1).

Definition at line 1883 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_writeLastEmptyBlock()

size_t ZSTD_writeLastEmptyBlock ( void *  dst,
size_t  dstCapacity 
)

Definition at line 4648 of file zstd_compress.c.

Here is the call graph for this function:

◆ ZSTD_writeSkippableFrame()

size_t ZSTD_writeSkippableFrame ( void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
unsigned  magicVariant 
)

Definition at line 4629 of file zstd_compress.c.

Here is the call graph for this function: