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