4#ifndef ZIP7_INC_MT_CODER_H
5#define ZIP7_INC_MT_CODER_H
18 #define MTCODER_GET_NUM_BLOCKS_FROM_THREADS(numThreads) ((numThreads) + (numThreads) / 8 + 1)
19 #define MTCODER_THREADS_MAX 64
20 #define MTCODER_BLOCKS_MAX (MTCODER_GET_NUM_BLOCKS_FROM_THREADS(MTCODER_THREADS_MAX) + 3)
22 #define MTCODER_THREADS_MAX 1
23 #define MTCODER_BLOCKS_MAX 1
40#define MtProgressThunk_INIT(p) { (p)->inSize = 0; (p)->outSize = 0; }
60 SRes (*
Code)(
void *p,
unsigned coderIndex,
unsigned outBufIndex,
62 SRes (*Write)(
void *p,
unsigned outBufIndex);
103 #ifdef MTCODER_USE_WRITE_THREAD
int BoolInt
Definition 7zTypes.h:259
INT32 LONG
Definition 7zTypes.h:190
#define EXTERN_C_BEGIN
Definition 7zTypes.h:20
unsigned long long int UInt64
Definition 7zTypes.h:234
int SRes
Definition 7zTypes.h:45
#define EXTERN_C_END
Definition 7zTypes.h:21
void MtCoder_Construct(CMtCoder *p)
Definition MtCoder.c:343
void MtCoder_Destruct(CMtCoder *p)
Definition MtCoder.c:416
void MtProgressThunk_CreateVTable(CMtProgressThunk *p)
Definition MtCoder.c:29
struct CMtCoder_ CMtCoder
SRes MtCoder_Code(CMtCoder *p)
Definition MtCoder.c:425
#define Code
Definition deflate.h:80
char int srcSize
Definition lz4.h:806
const char * src
Definition lz4.h:866
#define MTCODER_BLOCKS_MAX
Definition MtCoder.h:20
#define MTCODER_THREADS_MAX
Definition MtCoder.h:19
BoolInt stopReading
Definition MtCoder.h:100
unsigned numBlocksMax
Definition MtCoder.h:116
unsigned freeBlockList[MTCODER_BLOCKS_MAX]
Definition MtCoder.h:123
unsigned blockIndex
Definition MtCoder.h:117
CMtCoderBlock blocks[MTCODER_BLOCKS_MAX]
Definition MtCoder.h:126
size_t allocatedBufsSize
Definition MtCoder.h:95
Byte ReadyBlocks[MTCODER_BLOCKS_MAX]
Definition MtCoder.h:109
ISzAllocPtr allocBig
Definition MtCoder.h:87
UInt64 readProcessed
Definition MtCoder.h:118
unsigned freeBlockHead
Definition MtCoder.h:122
const Byte * inData
Definition MtCoder.h:83
CSemaphore blocksSemaphore
Definition MtCoder.h:98
CMtProgress mtProgress
Definition MtCoder.h:125
void * mtCallbackObject
Definition MtCoder.h:90
SRes readRes
Definition MtCoder.h:101
ICompressProgressPtr progress
Definition MtCoder.h:86
IMtCoderCallback2 * mtCallback
Definition MtCoder.h:89
unsigned writeIndex
Definition MtCoder.h:108
size_t blockSize
Definition MtCoder.h:78
LONG numFinishedThreads
Definition MtCoder.h:110
unsigned numStartedThreads
Definition MtCoder.h:114
CCriticalSection cs
Definition MtCoder.h:120
CMtCoderThread threads[MTCODER_THREADS_MAX]
Definition MtCoder.h:127
size_t inDataSize
Definition MtCoder.h:84
unsigned numStartedThreadsLimit
Definition MtCoder.h:113
SRes writeRes
Definition MtCoder.h:107
CAutoResetEvent readEvent
Definition MtCoder.h:97
CAutoResetEvent finishedEvent
Definition MtCoder.h:106
UInt64 expectedDataSize
Definition MtCoder.h:80
unsigned numThreadsMax
Definition MtCoder.h:79
ISeqInStreamPtr inStream
Definition MtCoder.h:82
uint finished
Definition dll.c:187
unsigned char Byte
Definition zconf.h:391