1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* LzmaDec.h -- LZMA Decoder
2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync2009-02-07 : Igor Pavlov : Public domain */
3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __LZMA_DEC_H
5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __LZMA_DEC_H
6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "Types.h"
8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifdef __cplusplus
10baa3858d3f5d128a5c8466b700098109edcad5f2repo syncextern "C" {
11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* #define _LZMA_PROB32 */
14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* _LZMA_PROB32 can increase the speed on some CPUs,
15baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   but memory usage for CLzmaDec::probs will be doubled in that case */
16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifdef _LZMA_PROB32
18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define CLzmaProb UInt32
19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#else
20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define CLzmaProb UInt16
21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- LZMA Properties ---------- */
25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define LZMA_PROPS_SIZE 5
27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
28baa3858d3f5d128a5c8466b700098109edcad5f2repo synctypedef struct _CLzmaProps
29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  unsigned lc, lp, pb;
31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 dicSize;
32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} CLzmaProps;
33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* LzmaProps_Decode - decodes properties
35baa3858d3f5d128a5c8466b700098109edcad5f2repo syncReturns:
36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_OK
37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_UNSUPPORTED - Unsupported properties
38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
40baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- LZMA Decoder state ---------- */
44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
48baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define LZMA_REQUIRED_INPUT_MAX 20
49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
50baa3858d3f5d128a5c8466b700098109edcad5f2repo synctypedef struct
51baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CLzmaProps prop;
53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CLzmaProb *probs;
54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  Byte *dic;
55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  const Byte *buf;
56baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 range, code;
57baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SizeT dicPos;
58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SizeT dicBufSize;
59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 processedPos;
60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 checkDicSize;
61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  unsigned state;
62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 reps[4];
63baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  unsigned remainLen;
64baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  int needFlush;
65baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  int needInitState;
66baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 numProbs;
67baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  unsigned tempBufSize;
68baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
69baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} CLzmaDec;
70baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
71baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
72baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
73baa3858d3f5d128a5c8466b700098109edcad5f2repo syncvoid LzmaDec_Init(CLzmaDec *p);
74baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
75baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* There are two types of LZMA streams:
76baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
77baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
78baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
79baa3858d3f5d128a5c8466b700098109edcad5f2repo synctypedef enum
80baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
81baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_ANY,   /* finish at any point */
82baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_END    /* block must be finished at the end */
83baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} ELzmaFinishMode;
84baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
85baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
86baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
87baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You must use LZMA_FINISH_END, when you know that current output buffer
88baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
89baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
90baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
91baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   and output value of destLen will be less than output buffer size limit.
92baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You can check status result also.
93baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
94baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You can use multiple checks to test data integrity after full decompression:
95baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     1) Check Result and "status" variable.
96baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
97baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
98baa3858d3f5d128a5c8466b700098109edcad5f2repo sync        You must use correct finish mode in that case. */
99baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
100baa3858d3f5d128a5c8466b700098109edcad5f2repo synctypedef enum
101baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
102baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_STATUS_NOT_SPECIFIED,               /* use main error code instead */
103baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_STATUS_FINISHED_WITH_MARK,          /* stream was finished with end mark. */
104baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_STATUS_NOT_FINISHED,                /* stream was not finished */
105baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_STATUS_NEEDS_MORE_INPUT,            /* you must provide more input bytes */
106baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK  /* there is probability that stream was finished without end mark */
107baa3858d3f5d128a5c8466b700098109edcad5f2repo sync} ELzmaStatus;
108baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
109baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ELzmaStatus is used only as output value for function call */
110baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
111baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
112baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- Interfaces ---------- */
113baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
114baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* There are 3 levels of interfaces:
115baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     1) Dictionary Interface
116baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     2) Buffer Interface
117baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     3) One Call Interface
118baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You can select any of these interfaces, but don't mix functions from different
119baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   groups for same object. */
120baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
121baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
122baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* There are two variants to allocate state for Dictionary Interface:
123baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     1) LzmaDec_Allocate / LzmaDec_Free
124baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
125baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You can use variant 2, if you set dictionary buffer manually.
126baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   For Buffer Interface you must always use variant 1.
127baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
128baa3858d3f5d128a5c8466b700098109edcad5f2repo syncLzmaDec_Allocate* can return:
129baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_OK
130baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_MEM         - Memory allocation error
131baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_UNSUPPORTED - Unsupported properties
132baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
133baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
134baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
135baa3858d3f5d128a5c8466b700098109edcad5f2repo syncvoid LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
136baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
137baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
138baa3858d3f5d128a5c8466b700098109edcad5f2repo syncvoid LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
139baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
140baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- Dictionary Interface ---------- */
141baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
142baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* You can use it, if you want to eliminate the overhead for data copying from
143baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   dictionary to some other external buffer.
144baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You must work with CLzmaDec variables directly in this interface.
145baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
146baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   STEPS:
147baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     LzmaDec_Constr()
148baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     LzmaDec_Allocate()
149baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     for (each new stream)
150baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     {
151baa3858d3f5d128a5c8466b700098109edcad5f2repo sync       LzmaDec_Init()
152baa3858d3f5d128a5c8466b700098109edcad5f2repo sync       while (it needs more decompression)
153baa3858d3f5d128a5c8466b700098109edcad5f2repo sync       {
154baa3858d3f5d128a5c8466b700098109edcad5f2repo sync         LzmaDec_DecodeToDic()
155baa3858d3f5d128a5c8466b700098109edcad5f2repo sync         use data from CLzmaDec::dic and update CLzmaDec::dicPos
156baa3858d3f5d128a5c8466b700098109edcad5f2repo sync       }
157baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     }
158baa3858d3f5d128a5c8466b700098109edcad5f2repo sync     LzmaDec_Free()
159baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
160baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
161baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* LzmaDec_DecodeToDic
162baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
163baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   The decoding to internal dictionary buffer (CLzmaDec::dic).
164baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
165baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
166baa3858d3f5d128a5c8466b700098109edcad5f2repo syncfinishMode:
167baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  It has meaning only if the decoding reaches output limit (dicLimit).
168baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_ANY - Decode just dicLimit bytes.
169baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_END - Stream must be finished after dicLimit.
170baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
171baa3858d3f5d128a5c8466b700098109edcad5f2repo syncReturns:
172baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_OK
173baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    status:
174baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_FINISHED_WITH_MARK
175baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_NOT_FINISHED
176baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_NEEDS_MORE_INPUT
177baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
178baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_DATA - Data error
179baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
180baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
181baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
182baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
183baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
184baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
185baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- Buffer Interface ---------- */
186baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
187baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* It's zlib-like interface.
188baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   See LzmaDec_DecodeToDic description for information about STEPS and return results,
189baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
190baa3858d3f5d128a5c8466b700098109edcad5f2repo sync   to work with CLzmaDec variables manually.
191baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
192baa3858d3f5d128a5c8466b700098109edcad5f2repo syncfinishMode:
193baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  It has meaning only if the decoding reaches output limit (*destLen).
194baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_ANY - Decode just destLen bytes.
195baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_END - Stream must be finished after (*destLen).
196baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
197baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
198baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
199baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
200baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
201baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
202baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* ---------- One Call Interface ---------- */
203baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
204baa3858d3f5d128a5c8466b700098109edcad5f2repo sync/* LzmaDecode
205baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
206baa3858d3f5d128a5c8466b700098109edcad5f2repo syncfinishMode:
207baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  It has meaning only if the decoding reaches output limit (*destLen).
208baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_ANY - Decode just destLen bytes.
209baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  LZMA_FINISH_END - Stream must be finished after (*destLen).
210baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
211baa3858d3f5d128a5c8466b700098109edcad5f2repo syncReturns:
212baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_OK
213baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    status:
214baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_FINISHED_WITH_MARK
215baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_NOT_FINISHED
216baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
217baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_DATA - Data error
218baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_MEM  - Memory allocation error
219baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_UNSUPPORTED - Unsupported properties
220baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
221baa3858d3f5d128a5c8466b700098109edcad5f2repo sync*/
222baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
223baa3858d3f5d128a5c8466b700098109edcad5f2repo syncSRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
224baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
225baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    ELzmaStatus *status, ISzAlloc *alloc);
226baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
227baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifdef __cplusplus
228baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}
229baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
230baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
231baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
232