drivers/pc80/pc: Clean up formatting of PS/2 related ASL code
[coreboot.git] / src / lib / lzmadecode.h
blob5498061762a8f967946e5f6a8c5392888ae07ddd
1 /*
2 LzmaDecode.h
3 LZMA Decoder interface
5 LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
6 http://www.7-zip.org/
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.
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.
22 #ifndef __LZMADECODE_H
23 #define __LZMADECODE_H
25 #include <types.h>
27 typedef unsigned char Byte;
28 typedef unsigned short UInt16;
29 typedef unsigned int UInt32;
30 typedef size_t SizeT;
32 #define CProb UInt16
34 #define LZMA_RESULT_OK 0
35 #define LZMA_RESULT_DATA_ERROR 1
38 #define LZMA_BASE_SIZE 1846
39 #define LZMA_LIT_SIZE 768
41 #define LZMA_PROPERTIES_SIZE 5
43 typedef struct _CLzmaProperties {
44 int lc;
45 int lp;
46 int pb;
47 } CLzmaProperties;
49 int LzmaDecodeProperties(CLzmaProperties *propsRes,
50 const unsigned char *propsData, int size);
52 #define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE \
53 << ((Properties)->lc + (Properties)->lp)))
55 #define kLzmaNeedInitId (-2)
57 typedef struct _CLzmaDecoderState {
58 CLzmaProperties Properties;
59 CProb *Probs;
60 } CLzmaDecoderState;
63 int LzmaDecode(CLzmaDecoderState *vs,
64 const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
65 unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
67 #endif