By moving the call to Load() up in SearchProvider::Start(), we are giving a chance...
[chromium-blink-merge.git] / third_party / lzma_sdk / Lzma2Dec.h
blob6bc07bbc185ec4a8e5268f455b3ef8ad55b92758
1 /* Lzma2Dec.h -- LZMA2 Decoder
2 2009-05-03 : Igor Pavlov : Public domain */
4 #ifndef __LZMA2_DEC_H
5 #define __LZMA2_DEC_H
7 #include "LzmaDec.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 /* ---------- State Interface ---------- */
15 typedef struct
17 CLzmaDec decoder;
18 UInt32 packSize;
19 UInt32 unpackSize;
20 int state;
21 Byte control;
22 Bool needInitDic;
23 Bool needInitState;
24 Bool needInitProp;
25 } CLzma2Dec;
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);
37 finishMode:
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
42 Returns:
43 SZ_OK
44 status:
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 ---------- */
61 finishMode:
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
66 Returns:
67 SZ_OK
68 status:
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);
80 #ifdef __cplusplus
82 #endif
84 #endif