source: tags/4.1.0/include/minilzo.h

Last change on this file was 1, checked in by katerina, 15 years ago

Initial import

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