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