OLD | NEW |
1 /* LzmaEnc.h -- LZMA Encoder | 1 /* LzmaEnc.h -- LZMA Encoder |
2 2009-02-07 : Igor Pavlov : Public domain */ | 2 2013-01-18 : Igor Pavlov : Public domain */ |
3 | 3 |
4 #ifndef __LZMA_ENC_H | 4 #ifndef __LZMA_ENC_H |
5 #define __LZMA_ENC_H | 5 #define __LZMA_ENC_H |
6 | 6 |
7 #include "Types.h" | 7 #include "7zTypes.h" |
8 | 8 |
9 #ifdef __cplusplus | 9 EXTERN_C_BEGIN |
10 extern "C" { | |
11 #endif | |
12 | 10 |
13 #define LZMA_PROPS_SIZE 5 | 11 #define LZMA_PROPS_SIZE 5 |
14 | 12 |
15 typedef struct _CLzmaEncProps | 13 typedef struct _CLzmaEncProps |
16 { | 14 { |
17 int level; /* 0 <= level <= 9 */ | 15 int level; /* 0 <= level <= 9 */ |
18 UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version | 16 UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version |
19 (1 << 12) <= dictSize <= (1 << 30) for 64-bit version | 17 (1 << 12) <= dictSize <= (1 << 30) for 64-bit version |
20 default = (1 << 24) */ | 18 default = (1 << 24) */ |
| 19 UInt64 reduceSize; /* estimated size of data that will be compressed. default
= 0xFFFFFFFF. |
| 20 Encoder uses this value to reduce dictionary size */ |
21 int lc; /* 0 <= lc <= 8, default = 3 */ | 21 int lc; /* 0 <= lc <= 8, default = 3 */ |
22 int lp; /* 0 <= lp <= 4, default = 0 */ | 22 int lp; /* 0 <= lp <= 4, default = 0 */ |
23 int pb; /* 0 <= pb <= 4, default = 2 */ | 23 int pb; /* 0 <= pb <= 4, default = 2 */ |
24 int algo; /* 0 - fast, 1 - normal, default = 1 */ | 24 int algo; /* 0 - fast, 1 - normal, default = 1 */ |
25 int fb; /* 5 <= fb <= 273, default = 32 */ | 25 int fb; /* 5 <= fb <= 273, default = 32 */ |
26 int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1
*/ | 26 int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1
*/ |
27 int numHashBytes; /* 2, 3 or 4, default = 4 */ | 27 int numHashBytes; /* 2, 3 or 4, default = 4 */ |
28 UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ | 28 UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ |
29 unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0
*/ | 29 unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0
*/ |
30 int numThreads; /* 1 or 2, default = 2 */ | 30 int numThreads; /* 1 or 2, default = 2 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 SZ_ERROR_MEM - Memory allocation error | 66 SZ_ERROR_MEM - Memory allocation error |
67 SZ_ERROR_PARAM - Incorrect paramater | 67 SZ_ERROR_PARAM - Incorrect paramater |
68 SZ_ERROR_OUTPUT_EOF - output buffer overflow | 68 SZ_ERROR_OUTPUT_EOF - output buffer overflow |
69 SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) | 69 SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) |
70 */ | 70 */ |
71 | 71 |
72 SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, | 72 SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, |
73 const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeE
ndMark, | 73 const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeE
ndMark, |
74 ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); | 74 ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); |
75 | 75 |
76 #ifdef __cplusplus | 76 EXTERN_C_END |
77 } | |
78 #endif | |
79 | 77 |
80 #endif | 78 #endif |
OLD | NEW |