]> code.delx.au - refind/blob - filesystems/minilzo.h
Modified SIP/CSR feature to work ON MACS when the csr-active-config
[refind] / filesystems / minilzo.h
1 /*
2 * this file take from grub 2.0
3 * for btrfs UEFI driver
4 */
5
6 /* minilzo.h -- mini subset of the LZO real-time data compression library
7
8 This file is part of the LZO real-time data compression library.
9
10 Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
11 Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
12 Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
13 Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
14 Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
15 Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
16 Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
17 Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
18 Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
19 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
20 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
21 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
22 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
23 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
24 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
25 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
26 All Rights Reserved.
27
28 The LZO library is free software; you can redistribute it and/or
29 modify it under the terms of the GNU General Public License as
30 published by the Free Software Foundation; either version 2 of
31 the License, or (at your option) any later version.
32
33 The LZO library is distributed in the hope that it will be useful,
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 GNU General Public License for more details.
37
38 You should have received a copy of the GNU General Public License
39 along with the LZO library; see the file COPYING.
40 If not, write to the Free Software Foundation, Inc.,
41 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
42
43 Markus F.X.J. Oberhumer
44 <markus@oberhumer.com>
45 http://www.oberhumer.com/opensource/lzo/
46 */
47
48 /*
49 * NOTE:
50 * the full LZO package can be found at
51 * http://www.oberhumer.com/opensource/lzo/
52 */
53
54
55 #ifndef __MINILZO_H
56 #define __MINILZO_H 1
57
58 #define MINILZO_VERSION 0x2050
59
60 #ifdef __LZOCONF_H
61 # error "you cannot use both LZO and miniLZO"
62 #endif
63
64 #undef LZO_HAVE_CONFIG_H
65 #include "lzoconf.h"
66
67 #if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
68 # error "version mismatch in header files"
69 #endif
70
71
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75
76
77 /***********************************************************************
78 //
79 ************************************************************************/
80
81 /* Memory required for the wrkmem parameter.
82 * When the required size is 0, you can also pass a NULL pointer.
83 */
84
85 #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
86 #define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
87 #define LZO1X_MEM_DECOMPRESS (0)
88
89
90 /* compression */
91 LZO_EXTERN(int)
92 lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
93 lzo_bytep dst, lzo_uintp dst_len,
94 lzo_voidp wrkmem );
95
96 /* decompression */
97 LZO_EXTERN(int)
98 lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
99 lzo_bytep dst, lzo_uintp dst_len,
100 lzo_voidp wrkmem /* NOT USED */ );
101
102 /* safe decompression with overrun testing */
103 LZO_EXTERN(int)
104 lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
105 lzo_bytep dst, lzo_uintp dst_len,
106 lzo_voidp wrkmem /* NOT USED */ );
107
108
109 #ifdef __cplusplus
110 } /* extern "C" */
111 #endif
112
113 #endif /* already included */
114