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