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