tron@2186: /* $Id$ */ tron@2186: truelight@0: /* minilzo.h -- mini subset of the LZO real-time data compression library truelight@0: truelight@0: This file is part of the LZO real-time data compression library. truelight@0: truelight@0: Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer truelight@0: Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer truelight@0: All Rights Reserved. truelight@0: truelight@0: The LZO library is free software; you can redistribute it and/or truelight@0: modify it under the terms of the GNU General Public License as truelight@0: published by the Free Software Foundation; either version 2 of truelight@0: the License, or (at your option) any later version. truelight@0: truelight@0: The LZO library is distributed in the hope that it will be useful, truelight@0: but WITHOUT ANY WARRANTY; without even the implied warranty of truelight@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the truelight@0: GNU General Public License for more details. truelight@0: truelight@0: You should have received a copy of the GNU General Public License truelight@0: along with the LZO library; see the file COPYING. truelight@0: If not, write to the Free Software Foundation, Inc., truelight@0: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. truelight@0: truelight@0: Markus F.X.J. Oberhumer truelight@0: truelight@0: http://www.oberhumer.com/opensource/lzo/ truelight@0: */ truelight@0: truelight@0: /* truelight@0: * NOTE: truelight@0: * the full LZO package can be found at truelight@0: * http://www.oberhumer.com/opensource/lzo/ truelight@0: */ truelight@0: truelight@0: Darkvater@2436: #ifndef MINILZO_H Darkvater@2436: #define MINILZO_H truelight@0: truelight@0: #define MINILZO_VERSION 0x1080 truelight@0: truelight@0: #ifdef __LZOCONF_H truelight@0: # error "you cannot use both LZO and miniLZO" truelight@0: #endif truelight@0: truelight@0: #undef LZO_HAVE_CONFIG_H truelight@0: #include "lzoconf.h" truelight@0: truelight@0: #if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) truelight@0: # error "version mismatch in header files" truelight@0: #endif truelight@0: truelight@0: truelight@0: #ifdef __cplusplus truelight@0: extern "C" { truelight@0: #endif truelight@0: truelight@0: truelight@0: /*********************************************************************** truelight@0: // truelight@0: ************************************************************************/ truelight@0: truelight@0: /* Memory required for the wrkmem parameter. truelight@0: * When the required size is 0, you can also pass a NULL pointer. truelight@0: */ truelight@0: truelight@0: #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS truelight@0: #define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) truelight@0: #define LZO1X_MEM_DECOMPRESS (0) truelight@0: truelight@0: truelight@0: /* compression */ truelight@0: LZO_EXTERN(int) truelight@0: lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len, truelight@0: lzo_byte *dst, lzo_uintp dst_len, truelight@0: lzo_voidp wrkmem ); truelight@0: truelight@0: /* decompression */ truelight@0: LZO_EXTERN(int) truelight@0: lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len, truelight@0: lzo_byte *dst, lzo_uintp dst_len, truelight@0: lzo_voidp wrkmem /* NOT USED */ ); truelight@0: truelight@0: /* safe decompression with overrun testing */ truelight@0: LZO_EXTERN(int) truelight@0: lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len, truelight@0: lzo_byte *dst, lzo_uintp dst_len, truelight@0: lzo_voidp wrkmem /* NOT USED */ ); truelight@0: truelight@0: truelight@0: #ifdef __cplusplus truelight@0: } /* extern "C" */ truelight@0: #endif truelight@0: Darkvater@2436: #endif /* MINILZO_H */