| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef ZIP7_INC_LZMA_ENC_H |
| 5 |
#define ZIP7_INC_LZMA_ENC_H |
| 6 |
|
| 7 |
#include "7zTypes.h" |
| 8 |
|
| 9 |
EXTERN_C_BEGIN |
| 10 |
|
| 11 |
#define LZMA_PROPS_SIZE 5 |
| 12 |
|
| 13 |
typedef struct |
| 14 |
{ |
| 15 |
int level; |
| 16 |
UInt32 dictSize; |
| 17 |
|
| 18 |
|
| 19 |
int lc; |
| 20 |
int lp; |
| 21 |
int pb; |
| 22 |
int algo; |
| 23 |
int fb; |
| 24 |
int btMode; |
| 25 |
int numHashBytes; |
| 26 |
unsigned numHashOutBits; |
| 27 |
UInt32 mc; |
| 28 |
unsigned writeEndMark; |
| 29 |
int numThreads; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
UInt64 reduceSize; |
| 34 |
|
| 35 |
|
| 36 |
UInt64 affinity; |
| 37 |
} CLzmaEncProps; |
| 38 |
|
| 39 |
void LzmaEncProps_Init(CLzmaEncProps *p); |
| 40 |
void LzmaEncProps_Normalize(CLzmaEncProps *p); |
| 41 |
UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
typedef struct CLzmaEnc CLzmaEnc; |
| 58 |
typedef CLzmaEnc * CLzmaEncHandle; |
| 59 |
|
| 60 |
|
| 61 |
CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc); |
| 62 |
void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig); |
| 63 |
|
| 64 |
SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); |
| 65 |
void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize); |
| 66 |
SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); |
| 67 |
unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p); |
| 68 |
|
| 69 |
SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStreamPtr outStream, ISeqInStreamPtr inStream, |
| 70 |
ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); |
| 71 |
SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, |
| 72 |
int writeEndMark, ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, |
| 78 |
const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, |
| 79 |
ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); |
| 80 |
|
| 81 |
EXTERN_C_END |
| 82 |
|
| 83 |
#endif |