Create tag for version 1.20
[oscam.git] / minilzo / minilzo.h
blobc1c2297574189797dc9895911957dae666dbcec2
1 /* minilzo.h -- mini subset of the LZO real-time data compression library
3 This file is part of the LZO real-time data compression library.
5 Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
6 All Rights Reserved.
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.
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.
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.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
25 http://www.oberhumer.com/opensource/lzo/
29 * NOTE:
30 * the full LZO package can be found at
31 * http://www.oberhumer.com/opensource/lzo/
35 #ifndef __MINILZO_H_INCLUDED
36 #define __MINILZO_H_INCLUDED 1
38 #define MINILZO_VERSION 0x20a0 /* 2.10 */
40 #if defined(__LZOCONF_H_INCLUDED)
41 # error "you cannot use both LZO and miniLZO"
42 #endif
44 /* internal Autoconf configuration file - only used when building miniLZO */
45 #ifdef MINILZO_HAVE_CONFIG_H
46 # include <config.h>
47 #endif
48 #include <limits.h>
49 #include <stddef.h>
51 #ifndef __LZODEFS_H_INCLUDED
52 #include "lzodefs.h"
53 #endif
54 #undef LZO_HAVE_CONFIG_H
55 #include "lzoconf.h"
57 #if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
58 # error "version mismatch in header files"
59 #endif
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
67 /***********************************************************************
69 ************************************************************************/
71 /* Memory required for the wrkmem parameter.
72 * When the required size is 0, you can also pass a NULL pointer.
75 #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
76 #define LZO1X_1_MEM_COMPRESS ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t))
77 #define LZO1X_MEM_DECOMPRESS (0)
80 /* compression */
81 LZO_EXTERN(int)
82 lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
83 lzo_bytep dst, lzo_uintp dst_len,
84 lzo_voidp wrkmem );
86 /* decompression */
87 LZO_EXTERN(int)
88 lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
89 lzo_bytep dst, lzo_uintp dst_len,
90 lzo_voidp wrkmem /* NOT USED */ );
92 /* safe decompression with overrun testing */
93 LZO_EXTERN(int)
94 lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
95 lzo_bytep dst, lzo_uintp dst_len,
96 lzo_voidp wrkmem /* NOT USED */ );
99 #ifdef __cplusplus
100 } /* extern "C" */
101 #endif
103 #endif /* already included */
106 /* vim:set ts=4 sw=4 et: */