Project Alice
Loading...
Searching...
No Matches
zstdmt_compress.h File Reference
#include "../common/zstd_deps.h"
#include "../zstd.h"
Include dependency graph for zstdmt_compress.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_parameters */
 
#define ZSTDMT_NBWORKERS_MAX   ((sizeof(void*)==4) /*32-bit*/ ? 64 : 256)
 
#define ZSTDMT_JOBSIZE_MIN   (512 KB)
 
#define ZSTDMT_JOBLOG_MAX   (MEM_32bits() ? 29 : 30)
 
#define ZSTDMT_JOBSIZE_MAX   (MEM_32bits() ? (512 MB) : (1024 MB))
 

Typedefs

typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx
 

Functions

ZSTDMT_CCtxZSTDMT_createCCtx_advanced (unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool *pool)
 
size_t ZSTDMT_freeCCtx (ZSTDMT_CCtx *mtctx)
 
size_t ZSTDMT_sizeof_CCtx (ZSTDMT_CCtx *mtctx)
 
size_t ZSTDMT_nextInputSizeHint (const ZSTDMT_CCtx *mtctx)
 
size_t ZSTDMT_initCStream_internal (ZSTDMT_CCtx *mtctx, const void *dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, const ZSTD_CDict *cdict, ZSTD_CCtx_params params, unsigned long long pledgedSrcSize)
 
size_t ZSTDMT_compressStream_generic (ZSTDMT_CCtx *mtctx, ZSTD_outBuffer *output, ZSTD_inBuffer *input, ZSTD_EndDirective endOp)
 
size_t ZSTDMT_toFlushNow (ZSTDMT_CCtx *mtctx)
 
void ZSTDMT_updateCParams_whileCompressing (ZSTDMT_CCtx *mtctx, const ZSTD_CCtx_params *cctxParams)
 
ZSTD_frameProgression ZSTDMT_getFrameProgression (ZSTDMT_CCtx *mtctx)
 

Macro Definition Documentation

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_parameters */

Definition at line 30 of file zstdmt_compress.h.

◆ ZSTDMT_JOBLOG_MAX

#define ZSTDMT_JOBLOG_MAX   (MEM_32bits() ? 29 : 30)

Definition at line 41 of file zstdmt_compress.h.

◆ ZSTDMT_JOBSIZE_MAX

#define ZSTDMT_JOBSIZE_MAX   (MEM_32bits() ? (512 MB) : (1024 MB))

Definition at line 42 of file zstdmt_compress.h.

◆ ZSTDMT_JOBSIZE_MIN

#define ZSTDMT_JOBSIZE_MIN   (512 KB)

Definition at line 39 of file zstdmt_compress.h.

◆ ZSTDMT_NBWORKERS_MAX

#define ZSTDMT_NBWORKERS_MAX   ((sizeof(void*)==4) /*32-bit*/ ? 64 : 256)

Definition at line 36 of file zstdmt_compress.h.

Typedef Documentation

◆ ZSTDMT_CCtx

typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx

Definition at line 51 of file zstdmt_compress.h.

Function Documentation

◆ ZSTDMT_compressStream_generic()

size_t ZSTDMT_compressStream_generic ( ZSTDMT_CCtx mtctx,
ZSTD_outBuffer output,
ZSTD_inBuffer input,
ZSTD_EndDirective  endOp 
)

ZSTDMT_compressStream_generic() : Combines ZSTDMT_compressStream() with optional ZSTDMT_flushStream() or ZSTDMT_endStream() depending on flush directive.

Returns
: minimum amount of data still to be flushed 0 if fully flushed or an error code note : needs to be init using any ZSTD_initCStream*() variant

ZSTDMT_compressStream_generic() : internal use only - exposed to be invoked from zstd_compress.c assumption : output and input are valid (pos <= size)

Returns
: minimum amount of data remaining to flush, 0 if none

Definition at line 1812 of file zstdmt_compress.c.

Here is the caller graph for this function:

◆ ZSTDMT_createCCtx_advanced()

ZSTDMT_CCtx * ZSTDMT_createCCtx_advanced ( unsigned  nbWorkers,
ZSTD_customMem  cMem,
ZSTD_threadPool *  pool 
)

Definition at line 976 of file zstdmt_compress.c.

Here is the call graph for this function:

◆ ZSTDMT_freeCCtx()

size_t ZSTDMT_freeCCtx ( ZSTDMT_CCtx mtctx)

Definition at line 1028 of file zstdmt_compress.c.

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

◆ ZSTDMT_getFrameProgression()

ZSTD_frameProgression ZSTDMT_getFrameProgression ( ZSTDMT_CCtx mtctx)

ZSTDMT_getFrameProgression(): tells how much data has been consumed (input) and produced (output) for current frame. able to count progression inside worker threads.

Definition at line 1097 of file zstdmt_compress.c.

Here is the caller graph for this function:

◆ ZSTDMT_initCStream_internal()

size_t ZSTDMT_initCStream_internal ( ZSTDMT_CCtx mtctx,
const void *  dict,
size_t  dictSize,
ZSTD_dictContentType_e  dictContentType,
const ZSTD_CDict cdict,
ZSTD_CCtx_params  params,
unsigned long long  pledgedSrcSize 
)

ZSTDMT_initCStream_internal() : Private use only. Init streaming operation. expects params to be valid. must receive dict, or cdict, or none, but not both. mtctx can be freshly constructed or reused from a prior compression. If mtctx is reused, memory allocations from the prior compression may not be freed, even if they are not needed for the current compression.

Returns
: 0, or an error code

Definition at line 1233 of file zstdmt_compress.c.

Here is the call graph for this function:

◆ ZSTDMT_nextInputSizeHint()

size_t ZSTDMT_nextInputSizeHint ( const ZSTDMT_CCtx mtctx)

Definition at line 1801 of file zstdmt_compress.c.

◆ ZSTDMT_sizeof_CCtx()

size_t ZSTDMT_sizeof_CCtx ( ZSTDMT_CCtx mtctx)

Definition at line 1046 of file zstdmt_compress.c.

Here is the call graph for this function:

◆ ZSTDMT_toFlushNow()

size_t ZSTDMT_toFlushNow ( ZSTDMT_CCtx mtctx)

ZSTDMT_toFlushNow() Tell how many bytes are ready to be flushed immediately. Probe the oldest active job (not yet entirely flushed) and check its output buffer. If return 0, it means there is no active job, or, it means oldest job is still active, but everything produced has been flushed so far, therefore flushing is limited by speed of oldest job.

Definition at line 1131 of file zstdmt_compress.c.

Here is the caller graph for this function:

◆ ZSTDMT_updateCParams_whileCompressing()

void ZSTDMT_updateCParams_whileCompressing ( ZSTDMT_CCtx mtctx,
const ZSTD_CCtx_params *  cctxParams 
)

ZSTDMT_updateCParams_whileCompressing() : Updates only a selected set of compression parameters, to remain compatible with current frame. New parameters will be applied to next compression job.

ZSTDMT_updateCParams_whileCompressing() : Updates a selected set of compression parameters, remaining compatible with currently active frame. New parameters will be applied to next compression job.

Definition at line 1080 of file zstdmt_compress.c.

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