1 /* Lzma2Dec.h -- LZMA2 Decoder
\r
2 2009-05-03 : Igor Pavlov : Public domain */
\r
4 #ifndef __LZMA2_DEC_H
\r
5 #define __LZMA2_DEC_H
\r
13 /* ---------- State Interface ---------- */
\r
27 #define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder)
\r
28 #define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc);
\r
29 #define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc);
\r
31 SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc);
\r
32 SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc);
\r
33 void Lzma2Dec_Init(CLzma2Dec *p);
\r
38 It has meaning only if the decoding reaches output limit (*destLen or dicLimit).
\r
39 LZMA_FINISH_ANY - use smallest number of input bytes
\r
40 LZMA_FINISH_END - read EndOfStream marker after decoding
\r
45 LZMA_STATUS_FINISHED_WITH_MARK
\r
46 LZMA_STATUS_NOT_FINISHED
\r
47 LZMA_STATUS_NEEDS_MORE_INPUT
\r
48 SZ_ERROR_DATA - Data error
\r
51 SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
\r
52 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
\r
54 SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen,
\r
55 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
\r
58 /* ---------- One Call Interface ---------- */
\r
62 It has meaning only if the decoding reaches output limit (*destLen).
\r
63 LZMA_FINISH_ANY - use smallest number of input bytes
\r
64 LZMA_FINISH_END - read EndOfStream marker after decoding
\r
69 LZMA_STATUS_FINISHED_WITH_MARK
\r
70 LZMA_STATUS_NOT_FINISHED
\r
71 SZ_ERROR_DATA - Data error
\r
72 SZ_ERROR_MEM - Memory allocation error
\r
73 SZ_ERROR_UNSUPPORTED - Unsupported properties
\r
74 SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
\r
77 SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
\r
78 Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc);
\r