Project Alice
|
#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"
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_CCtx * | ZSTD_createCCtx (void) |
ZSTD_CCtx * | ZSTD_createCCtx_advanced (ZSTD_customMem customMem) |
ZSTD_CCtx * | ZSTD_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_t * | ZSTD_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_CDict * | ZSTD_createCDict_advanced (const void *dictBuffer, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_compressionParameters cParams, ZSTD_customMem customMem) |
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) |
ZSTD_CDict * | ZSTD_createCDict (const void *dict, size_t dictSize, int compressionLevel) |
ZSTD_CDict * | ZSTD_createCDict_byReference (const void *dict, size_t dictSize, int compressionLevel) |
size_t | ZSTD_freeCDict (ZSTD_CDict *cdict) |
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_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_CStream * | ZSTD_createCStream (void) |
ZSTD_CStream * | ZSTD_initStaticCStream (void *workspace, size_t workspaceSize) |
ZSTD_CStream * | ZSTD_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) |
#define BOUNDCHECK | ( | cParam, | |
val | |||
) |
Definition at line 653 of file zstd_compress.c.
#define CLAMP | ( | cParam, | |
val | |||
) | CLAMP_TYPE(cParam, val, unsigned) |
#define CLAMP_TYPE | ( | cParam, | |
val, | |||
type | |||
) |
#define COMPRESS_LITERALS_SIZE_MIN 63 /* heuristic */ |
#define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */ |
Definition at line 18 of file zstd_compress.c.
#define MIN_SEQUENCES_BLOCK_SPLITTING 300 |
Definition at line 4116 of file zstd_compress.c.
#define SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO 20 |
Definition at line 2874 of file zstd_compress.c.
#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.
#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.
#define ZSTD_INDEXOVERFLOW_MARGIN (16 MB) |
Definition at line 2068 of file zstd_compress.c.
#define ZSTD_NO_CLEVEL 0 |
Definition at line 373 of file zstd_compress.c.
#define ZSTD_ROWSIZE 16 |
Definition at line 2593 of file zstd_compress.c.
#define ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER (6ULL) |
Definition at line 5108 of file zstd_compress.c.
#define ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF (128 KB) |
Definition at line 5107 of file zstd_compress.c.
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.
enum ZSTD_buildSeqStore_e |
Enumerator | |
---|---|
ZSTDbss_compress | |
ZSTDbss_noCompress |
Definition at line 3200 of file zstd_compress.c.
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.
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.
enum ZSTD_resetTarget_e |
Enumerator | |
---|---|
ZSTD_resetTarget_CDict | |
ZSTD_resetTarget_CCtx |
Definition at line 1955 of file zstd_compress.c.
ZSTD_compressionParameters ZSTD_adjustCParams | ( | ZSTD_compressionParameters | cPar, |
unsigned long long | srcSize, | ||
size_t | dictSize | ||
) |
Definition at line 1603 of file zstd_compress.c.
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
Definition at line 3734 of file zstd_compress.c.
size_t ZSTD_CCtx_getParameter | ( | ZSTD_CCtx const * | cctx, |
ZSTD_cParameter | param, | ||
int * | value | ||
) |
Definition at line 1017 of file zstd_compress.c.
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.
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.
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.
size_t ZSTD_CCtx_loadDictionary_byReference | ( | ZSTD_CCtx * | cctx, |
const void * | dict, | ||
size_t | dictSize | ||
) |
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.
Definition at line 1319 of file zstd_compress.c.
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).
Definition at line 1337 of file zstd_compress.c.
size_t ZSTD_CCtx_refPrefix_advanced | ( | ZSTD_CCtx * | cctx, |
const void * | prefix, | ||
size_t | prefixSize, | ||
ZSTD_dictContentType_e | dictContentType | ||
) |
size_t ZSTD_CCtx_refThreadPool | ( | ZSTD_CCtx * | cctx, |
ZSTD_threadPool * | pool | ||
) |
Definition at line 1329 of file zstd_compress.c.
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.
size_t ZSTD_CCtx_setCParams | ( | ZSTD_CCtx * | cctx, |
ZSTD_compressionParameters | cparams | ||
) |
Definition at line 1183 of file zstd_compress.c.
size_t ZSTD_CCtx_setFParams | ( | ZSTD_CCtx * | cctx, |
ZSTD_frameParameters | fparams | ||
) |
Definition at line 1199 of file zstd_compress.c.
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()).
Definition at line 709 of file zstd_compress.c.
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.
size_t ZSTD_CCtx_setParams | ( | ZSTD_CCtx * | cctx, |
ZSTD_parameters | params | ||
) |
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.
Definition at line 1221 of file zstd_compress.c.
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.
size_t ZSTD_CCtxParams_getParameter | ( | ZSTD_CCtx_params const * | CCtxParams, |
ZSTD_cParameter | param, | ||
int * | value | ||
) |
size_t ZSTD_CCtxParams_init | ( | ZSTD_CCtx_params * | cctxParams, |
int | compressionLevel | ||
) |
size_t ZSTD_CCtxParams_init_advanced | ( | ZSTD_CCtx_params * | cctxParams, |
ZSTD_parameters | params | ||
) |
void ZSTD_CCtxParams_registerSequenceProducer | ( | ZSTD_CCtx_params * | params, |
void * | extSeqProdState, | ||
ZSTD_sequenceProducer_F | extSeqProdFunc | ||
) |
size_t ZSTD_CCtxParams_reset | ( | ZSTD_CCtx_params * | params | ) |
Definition at line 360 of file zstd_compress.c.
size_t ZSTD_CCtxParams_setParameter | ( | ZSTD_CCtx_params * | CCtxParams, |
ZSTD_cParameter | param, | ||
int | value | ||
) |
size_t ZSTD_checkCParams | ( | ZSTD_compressionParameters | cParams | ) |
ZSTD_checkCParams() : control CParam values remain within authorized range.
Definition at line 1379 of file zstd_compress.c.
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.
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.
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.
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. 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.
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 | ||
) |
Definition at line 5333 of file zstd_compress.c.
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.
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.
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.
size_t ZSTD_compressBegin | ( | ZSTD_CCtx * | cctx, |
int | compressionLevel | ||
) |
Definition at line 5210 of file zstd_compress.c.
size_t ZSTD_compressBegin_advanced | ( | ZSTD_CCtx * | cctx, |
const void * | dict, | ||
size_t | dictSize, | ||
ZSTD_parameters | params, | ||
unsigned long long | pledgedSrcSize | ||
) |
ZSTD_compressBegin_advanced() :
Definition at line 5180 of file zstd_compress.c.
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.
size_t ZSTD_compressBegin_usingCDict | ( | ZSTD_CCtx * | cctx, |
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 | ||
) |
Definition at line 5737 of file zstd_compress.c.
size_t ZSTD_compressBegin_usingCDict_deprecated | ( | ZSTD_CCtx * | cctx, |
const ZSTD_CDict * | cdict | ||
) |
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.
size_t ZSTD_compressBlock | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
size_t ZSTD_compressBlock_deprecated | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
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.
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.
size_t ZSTD_compressContinue | ( | ZSTD_CCtx * | cctx, |
void * | dst, | ||
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
size_t ZSTD_compressContinue_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_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.
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_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.
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.
Definition at line 6314 of file zstd_compress.c.
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.
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".
Definition at line 2579 of file zstd_compress.c.
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 | ||
) |
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.
Definition at line 426 of file zstd_compress.c.
ZSTD_CCtx * ZSTD_createCCtx | ( | void | ) |
Definition at line 96 of file zstd_compress.c.
ZSTD_CCtx * ZSTD_createCCtx_advanced | ( | ZSTD_customMem | customMem | ) |
Definition at line 113 of file zstd_compress.c.
ZSTD_CCtx_params * ZSTD_createCCtxParams | ( | void | ) |
Definition at line 348 of file zstd_compress.c.
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.
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.
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.
ZSTD_CDict * ZSTD_createCDict_byReference | ( | const void * | dict, |
size_t | dictSize, | ||
int | compressionLevel | ||
) |
ZSTD_CStream * ZSTD_createCStream | ( | void | ) |
ZSTD_CStream * ZSTD_createCStream_advanced | ( | ZSTD_customMem | customMem | ) |
Definition at line 5811 of file zstd_compress.c.
size_t ZSTD_CStreamInSize | ( | void | ) |
recommended size for input buffer
Definition at line 5825 of file zstd_compress.c.
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.
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.
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.
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.
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 | ||
) |
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.
size_t ZSTD_estimateCCtxSize | ( | int | compressionLevel | ) |
Definition at line 1789 of file zstd_compress.c.
size_t ZSTD_estimateCCtxSize_usingCCtxParams | ( | const ZSTD_CCtx_params * | params | ) |
Definition at line 1744 of file zstd_compress.c.
size_t ZSTD_estimateCCtxSize_usingCParams | ( | ZSTD_compressionParameters | cParams | ) |
size_t ZSTD_estimateCDictSize | ( | size_t | dictSize, |
int | compressionLevel | ||
) |
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.
size_t ZSTD_estimateCStreamSize | ( | int | compressionLevel | ) |
Definition at line 1844 of file zstd_compress.c.
size_t ZSTD_estimateCStreamSize_usingCCtxParams | ( | const ZSTD_CCtx_params * | params | ) |
Definition at line 1801 of file zstd_compress.c.
size_t ZSTD_estimateCStreamSize_usingCParams | ( | ZSTD_compressionParameters | cParams | ) |
size_t ZSTD_flushStream | ( | ZSTD_CStream * | zcs, |
ZSTD_outBuffer * | output | ||
) |
Definition at line 6959 of file zstd_compress.c.
size_t ZSTD_freeCCtx | ( | ZSTD_CCtx * | cctx | ) |
Definition at line 179 of file zstd_compress.c.
size_t ZSTD_freeCCtxParams | ( | ZSTD_CCtx_params * | params | ) |
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.
size_t ZSTD_freeCStream | ( | ZSTD_CStream * | zcs | ) |
size_t ZSTD_generateSequences | ( | ZSTD_CCtx * | zc, |
ZSTD_Sequence * | outSeqs, | ||
size_t | outSeqsSize, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
size_t ZSTD_getBlockSize | ( | const ZSTD_CCtx * | cctx | ) |
Definition at line 4755 of file zstd_compress.c.
ZSTD_compressionParameters ZSTD_getCParams | ( | int | compressionLevel, |
unsigned long long | srcSizeHint, | ||
size_t | dictSize | ||
) |
Definition at line 7100 of file zstd_compress.c.
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.
ZSTD_compressionParameters ZSTD_getCParamsFromCDict | ( | const ZSTD_CDict * | cdict | ) |
ZSTD_getCParamsFromCDict() : as the name implies
Definition at line 5677 of file zstd_compress.c.
unsigned ZSTD_getDictID_fromCDict | ( | const ZSTD_CDict * | cdict | ) |
ZSTD_getDictID_fromCDict() : Provides the dictID of the dictionary loaded into cdict
. If
Definition at line 5687 of file zstd_compress.c.
ZSTD_frameProgression ZSTD_getFrameProgression | ( | const ZSTD_CCtx * | cctx | ) |
ZSTD_parameters ZSTD_getParams | ( | int | compressionLevel, |
unsigned long long | srcSizeHint, | ||
size_t | dictSize | ||
) |
ZSTD_getParams() : same idea as ZSTD_getCParams()
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.
const seqStore_t * ZSTD_getSeqStore | ( | const ZSTD_CCtx * | ctx | ) |
Definition at line 220 of file zstd_compress.c.
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.
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_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.
size_t ZSTD_initCStream_srcSize | ( | ZSTD_CStream * | zcs, |
int | compressionLevel, | ||
unsigned long long | pss | ||
) |
size_t ZSTD_initCStream_usingCDict | ( | ZSTD_CStream * | zcs, |
const ZSTD_CDict * | cdict | ||
) |
size_t ZSTD_initCStream_usingCDict_advanced | ( | ZSTD_CStream * | zcs, |
const ZSTD_CDict * | cdict, | ||
ZSTD_frameParameters | fParams, | ||
unsigned long long | pledgedSrcSize | ||
) |
size_t ZSTD_initCStream_usingDict | ( | ZSTD_CStream * | zcs, |
const void * | dict, | ||
size_t | dictSize, | ||
int | compressionLevel | ||
) |
ZSTD_CCtx * ZSTD_initStaticCCtx | ( | void * | workspace, |
size_t | workspaceSize | ||
) |
Definition at line 125 of file zstd_compress.c.
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.
Definition at line 5630 of file zstd_compress.c.
ZSTD_CStream * ZSTD_initStaticCStream | ( | void * | workspace, |
size_t | workspaceSize | ||
) |
void ZSTD_invalidateRepCodes | ( | ZSTD_CCtx * | cctx | ) |
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.
int ZSTD_maxCLevel | ( | void | ) |
maximum compression level available
Definition at line 6986 of file zstd_compress.c.
size_t ZSTD_mergeBlockDelimiters | ( | ZSTD_Sequence * | sequences, |
size_t | seqsSize | ||
) |
Definition at line 3491 of file zstd_compress.c.
int ZSTD_minCLevel | ( | void | ) |
minimum negative compression level allowed, requires v1.4.0+
Definition at line 6987 of file zstd_compress.c.
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.
Definition at line 4658 of file zstd_compress.c.
void ZSTD_registerSequenceProducer | ( | ZSTD_CCtx * | zc, |
void * | extSeqProdState, | ||
ZSTD_sequenceProducer_F | extSeqProdFunc | ||
) |
void ZSTD_reset_compressedBlockState | ( | ZSTD_compressedBlockState_t * | bs | ) |
size_t ZSTD_resetCStream | ( | ZSTD_CStream * | zcs, |
unsigned long long | pss | ||
) |
void ZSTD_resetSeqStore | ( | seqStore_t * | ssPtr | ) |
Definition at line 3127 of file zstd_compress.c.
ZSTD_blockCompressor ZSTD_selectBlockCompressor | ( | ZSTD_strategy | strat, |
ZSTD_paramSwitch_e | useRowMatchFinder, | ||
ZSTD_dictMode_e | dictMode | ||
) |
Definition at line 3035 of file zstd_compress.c.
int ZSTD_seqToCodes | ( | const seqStore_t * | seqStorePtr | ) |
size_t ZSTD_sequenceBound | ( | size_t | srcSize | ) |
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.
size_t ZSTD_sizeof_CDict | ( | const ZSTD_CDict * | cdict | ) |
Definition at line 5417 of file zstd_compress.c.
size_t ZSTD_sizeof_CStream | ( | const ZSTD_CStream * | zcs | ) |
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.
size_t ZSTD_writeLastEmptyBlock | ( | void * | dst, |
size_t | dstCapacity | ||
) |
size_t ZSTD_writeSkippableFrame | ( | void * | dst, |
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize, | ||
unsigned | magicVariant | ||
) |