root/ar5315_microredboot/microredboot/boot/src/lib/LzmaDecode.h

Revision 12327, 2.0 kB (checked in by BrainSlayer, 5 months ago)

activate in code optimizations for LZMA

  • Property svn:executable set to *
Line 
1 /*
2   LzmaDecode.h
3   LZMA Decoder interface
4
5   LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
6   http://www.7-zip.org/
7
8   LZMA SDK is licensed under two licenses:
9   1) GNU Lesser General Public License (GNU LGPL)
10   2) Common Public License (CPL)
11   It means that you can select one of these two licenses and
12   follow rules of that license.
13
14   SPECIAL EXCEPTION:
15   Igor Pavlov, as the author of this code, expressly permits you to
16   statically or dynamically link your code (or bind by name) to the
17   interfaces of this file without subjecting your linked code to the
18   terms of the CPL or GNU LGPL. Any modifications or additions
19   to this file, however, are subject to the LGPL or CPL terms.
20 */
21
22 #ifndef __LZMADECODE_H
23 #define __LZMADECODE_H
24
25 /* #define _LZMA_IN_CB */
26 /* Use callback for input data */
27
28 /* #define _LZMA_OUT_READ */
29 /* Use read function for output data */
30
31 #define _LZMA_PROB32
32 /* It can increase speed on some 32-bit CPUs,
33    but memory usage will be doubled in that case */
34
35 #define _LZMA_LOC_OPT
36 //Enable local speed optimizations inside code
37
38 #ifndef UInt32
39 #ifdef _LZMA_UINT32_IS_ULONG
40 #define UInt32 unsigned long
41 #else
42 #define UInt32 unsigned int
43 #endif
44 #endif
45
46 #ifdef _LZMA_PROB32
47 #define CProb UInt32
48 #else
49 #define CProb unsigned short
50 #endif
51
52 #define LZMA_RESULT_OK 0
53 #define LZMA_RESULT_DATA_ERROR 1
54 #define LZMA_RESULT_NOT_ENOUGH_MEM 2
55
56 #define LZMA_BASE_SIZE 1846
57 #define LZMA_LIT_SIZE 768
58
59 /*
60 bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
61 bufferSize += 100 in case of _LZMA_OUT_READ
62 by default CProb is unsigned short,
63 but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
64 */
65
66 #ifdef _LZMA_OUT_READ
67 static int LzmaDecoderInit(unsigned char *buffer, UInt32 bufferSize,
68                            int lc, int lp, int pb,
69                            unsigned char *dictionary, UInt32 dictionarySize,);
70 #endif
71
72 static int LzmaDecode(unsigned char *buffer,
73 #ifndef _LZMA_OUT_READ
74                       UInt32 bufferSize, int lc, int lp, int pb,
75 #endif
76                       unsigned char *outStream, UInt32 outSize,
77                       UInt32 * outSizeProcessed);
78
79 #endif
Note: See TracBrowser for help on using the browser.