Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
zstdmt_compress.c File Reference

Data Structures

struct  buffer_s
 
struct  ZSTDMT_bufferPool_s
 
struct  ZSTDMT_CCtxPool
 
struct  range_t
 
struct  serialState_t
 
struct  ZSTDMT_jobDescription
 
struct  inBuff_t
 
struct  roundBuff_t
 
struct  rsyncState_t
 
struct  ZSTDMT_CCtx_s
 
struct  syncPoint_t
 

Macros

#define ZSTD_RESIZE_SEQPOOL   0
 
#define ZSTD_PTHREAD_MUTEX_LOCK(m)
 
#define DEBUG_PRINTHEX(l, p, n)
 
#define BUF_POOL_MAX_NB_BUFFERS(nbWorkers)
 
#define SEQ_POOL_MAX_NB_BUFFERS(nbWorkers)
 
#define JOB_ERROR(e)
 
#define RSYNC_LENGTH   32
 
#define RSYNC_MIN_BLOCK_LOG   ZSTD_BLOCKSIZELOG_MAX
 
#define RSYNC_MIN_BLOCK_SIZE   (1<<RSYNC_MIN_BLOCK_LOG)
 

Typedefs

typedef struct buffer_s buffer_t
 
typedef struct ZSTDMT_bufferPool_s ZSTDMT_bufferPool
 

Functions

MEM_STATIC ZSTDMT_CCtxZSTDMT_createCCtx_advanced_internal (unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool *pool)
 
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)
 
void ZSTDMT_updateCParams_whileCompressing (ZSTDMT_CCtx *mtctx, const ZSTD_CCtx_params *cctxParams)
 
ZSTD_frameProgression ZSTDMT_getFrameProgression (ZSTDMT_CCtx *mtctx)
 
size_t ZSTDMT_toFlushNow (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_nextInputSizeHint (const ZSTDMT_CCtx *mtctx)
 
size_t ZSTDMT_compressStream_generic (ZSTDMT_CCtx *mtctx, ZSTD_outBuffer *output, ZSTD_inBuffer *input, ZSTD_EndDirective endOp)
 

Macro Definition Documentation

◆ BUF_POOL_MAX_NB_BUFFERS

#define BUF_POOL_MAX_NB_BUFFERS ( nbWorkers)
Value:
(2*(nbWorkers) + 3)

◆ DEBUG_PRINTHEX

#define DEBUG_PRINTHEX ( l,
p,
n )
Value:
do { } while (0)

◆ JOB_ERROR

#define JOB_ERROR ( e)
Value:
do { \
ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); \
job->cSize = e; \
ZSTD_pthread_mutex_unlock(&job->job_mutex); \
goto _endJob; \
} while (0)
Definition parallel_compression.c:94
#define e(i)
Definition sha256.c:45

◆ RSYNC_LENGTH

#define RSYNC_LENGTH   32

◆ RSYNC_MIN_BLOCK_LOG

#define RSYNC_MIN_BLOCK_LOG   ZSTD_BLOCKSIZELOG_MAX

◆ RSYNC_MIN_BLOCK_SIZE

#define RSYNC_MIN_BLOCK_SIZE   (1<<RSYNC_MIN_BLOCK_LOG)

◆ SEQ_POOL_MAX_NB_BUFFERS

#define SEQ_POOL_MAX_NB_BUFFERS ( nbWorkers)
Value:
(nbWorkers)

◆ ZSTD_PTHREAD_MUTEX_LOCK

#define ZSTD_PTHREAD_MUTEX_LOCK ( m)
Value:
#define ZSTD_pthread_mutex_lock(a)
Definition threading.h:137

◆ ZSTD_RESIZE_SEQPOOL

#define ZSTD_RESIZE_SEQPOOL   0

Typedef Documentation

◆ buffer_t

typedef struct buffer_s buffer_t

◆ ZSTDMT_bufferPool

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

◆ ZSTDMT_createCCtx_advanced()

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

◆ ZSTDMT_createCCtx_advanced_internal()

MEM_STATIC ZSTDMT_CCtx * ZSTDMT_createCCtx_advanced_internal ( unsigned nbWorkers,
ZSTD_customMem cMem,
ZSTD_threadPool * pool )

◆ ZSTDMT_freeCCtx()

size_t ZSTDMT_freeCCtx ( ZSTDMT_CCtx * mtctx)

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

◆ 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

◆ ZSTDMT_nextInputSizeHint()

size_t ZSTDMT_nextInputSizeHint ( const ZSTDMT_CCtx * mtctx)

◆ ZSTDMT_sizeof_CCtx()

size_t ZSTDMT_sizeof_CCtx ( ZSTDMT_CCtx * mtctx)

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

◆ ZSTDMT_updateCParams_whileCompressing()

void ZSTDMT_updateCParams_whileCompressing ( ZSTDMT_CCtx * mtctx,
const ZSTD_CCtx_params * cctxParams )

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.