OLD | NEW |
1 /* Lzma2Dec.h -- LZMA2 Decoder | 1 /* Lzma2Dec.h -- LZMA2 Decoder |
2 2009-05-03 : Igor Pavlov : Public domain */ | 2 2015-05-13 : Igor Pavlov : Public domain */ |
3 | 3 |
4 #ifndef __LZMA2_DEC_H | 4 #ifndef __LZMA2_DEC_H |
5 #define __LZMA2_DEC_H | 5 #define __LZMA2_DEC_H |
6 | 6 |
7 #include "LzmaDec.h" | 7 #include "LzmaDec.h" |
8 | 8 |
9 #ifdef __cplusplus | 9 EXTERN_C_BEGIN |
10 extern "C" { | |
11 #endif | |
12 | 10 |
13 /* ---------- State Interface ---------- */ | 11 /* ---------- State Interface ---------- */ |
14 | 12 |
15 typedef struct | 13 typedef struct |
16 { | 14 { |
17 CLzmaDec decoder; | 15 CLzmaDec decoder; |
18 UInt32 packSize; | 16 UInt32 packSize; |
19 UInt32 unpackSize; | 17 UInt32 unpackSize; |
20 int state; | 18 unsigned state; |
21 Byte control; | 19 Byte control; |
22 Bool needInitDic; | 20 Bool needInitDic; |
23 Bool needInitState; | 21 Bool needInitState; |
24 Bool needInitProp; | 22 Bool needInitProp; |
25 } CLzma2Dec; | 23 } CLzma2Dec; |
26 | 24 |
27 #define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) | 25 #define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) |
28 #define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc); | 26 #define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc); |
29 #define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc); | 27 #define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc); |
30 | 28 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 LZMA_STATUS_NOT_FINISHED | 68 LZMA_STATUS_NOT_FINISHED |
71 SZ_ERROR_DATA - Data error | 69 SZ_ERROR_DATA - Data error |
72 SZ_ERROR_MEM - Memory allocation error | 70 SZ_ERROR_MEM - Memory allocation error |
73 SZ_ERROR_UNSUPPORTED - Unsupported properties | 71 SZ_ERROR_UNSUPPORTED - Unsupported properties |
74 SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). | 72 SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). |
75 */ | 73 */ |
76 | 74 |
77 SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, | 75 SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, |
78 Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc)
; | 76 Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc)
; |
79 | 77 |
80 #ifdef __cplusplus | 78 EXTERN_C_END |
81 } | |
82 #endif | |
83 | 79 |
84 #endif | 80 #endif |
OLD | NEW |