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