1 /* Lzma2Dec.h -- LZMA2 Decoder
\r
2 2015-05-13 : Igor Pavlov : Public domain */
\r
4 #ifndef __LZMA2_DEC_H
\r
5 #define __LZMA2_DEC_H
\r
11 /* ---------- State Interface ---------- */
\r
25 #define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder)
\r
26 #define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc);
\r
27 #define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc);
\r
29 SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc);
\r
30 SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc);
\r
31 void Lzma2Dec_Init(CLzma2Dec *p);
\r
36 It has meaning only if the decoding reaches output limit (*destLen or dicLimit).
\r
37 LZMA_FINISH_ANY - use smallest number of input bytes
\r
38 LZMA_FINISH_END - read EndOfStream marker after decoding
\r
43 LZMA_STATUS_FINISHED_WITH_MARK
\r
44 LZMA_STATUS_NOT_FINISHED
\r
45 LZMA_STATUS_NEEDS_MORE_INPUT
\r
46 SZ_ERROR_DATA - Data error
\r
49 SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
\r
50 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
\r
52 SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen,
\r
53 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
\r
56 /* ---------- One Call Interface ---------- */
\r
60 It has meaning only if the decoding reaches output limit (*destLen).
\r
61 LZMA_FINISH_ANY - use smallest number of input bytes
\r
62 LZMA_FINISH_END - read EndOfStream marker after decoding
\r
67 LZMA_STATUS_FINISHED_WITH_MARK
\r
68 LZMA_STATUS_NOT_FINISHED
\r
69 SZ_ERROR_DATA - Data error
\r
70 SZ_ERROR_MEM - Memory allocation error
\r
71 SZ_ERROR_UNSUPPORTED - Unsupported properties
\r
72 SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
\r
75 SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
\r
76 Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc);
\r