1 /* Lzma2Enc.h -- LZMA2 Encoder
\r
2 2013-01-18 : Igor Pavlov : Public domain */
\r
4 #ifndef __LZMA2_ENC_H
\r
5 #define __LZMA2_ENC_H
\r
13 CLzmaEncProps lzmaProps;
\r
15 int numBlockThreads;
\r
16 int numTotalThreads;
\r
19 void Lzma2EncProps_Init(CLzma2EncProps *p);
\r
20 void Lzma2EncProps_Normalize(CLzma2EncProps *p);
\r
22 /* ---------- CLzmaEnc2Handle Interface ---------- */
\r
24 /* Lzma2Enc_* functions can return the following exit codes:
\r
27 SZ_ERROR_MEM - Memory allocation error
\r
28 SZ_ERROR_PARAM - Incorrect paramater in props
\r
29 SZ_ERROR_WRITE - Write callback error
\r
30 SZ_ERROR_PROGRESS - some break from progress callback
\r
31 SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
\r
34 typedef void * CLzma2EncHandle;
\r
36 CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig);
\r
37 void Lzma2Enc_Destroy(CLzma2EncHandle p);
\r
38 SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props);
\r
39 Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p);
\r
40 SRes Lzma2Enc_Encode(CLzma2EncHandle p,
\r
41 ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress);
\r
43 /* ---------- One Call Interface ---------- */
\r
48 SZ_ERROR_MEM - Memory allocation error
\r
49 SZ_ERROR_PARAM - Incorrect paramater
\r
50 SZ_ERROR_OUTPUT_EOF - output buffer overflow
\r
51 SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
\r
55 SRes Lzma2Encode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
\r
56 const CLzmaEncProps *props, Byte *propsEncoded, int writeEndMark,
\r
57 ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
\r