tron@2186: /* $Id$ */ tron@2186: rubidium@9111: /** rubidium@9111: * @file minilzo.h Mini subset of the LZO real-time data compression library rubidium@9111: * rubidium@9111: * This file is part of the LZO real-time data compression library. rubidium@9111: * rubidium@9111: * Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer rubidium@9111: * All Rights Reserved. rubidium@9111: * rubidium@9111: * The LZO library is free software; you can redistribute it and/or rubidium@9111: * modify it under the terms of the GNU General Public License as rubidium@9111: * published by the Free Software Foundation; either version 2 of rubidium@9111: * the License, or (at your option) any later version. rubidium@9111: * rubidium@9111: * The LZO library is distributed in the hope that it will be useful, rubidium@9111: * but WITHOUT ANY WARRANTY; without even the implied warranty of rubidium@9111: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the rubidium@9111: * GNU General Public License for more details. rubidium@9111: * rubidium@9111: * You should have received a copy of the GNU General Public License rubidium@9111: * along with the LZO library; see the file COPYING. rubidium@9111: * If not, write to the Free Software Foundation, Inc., rubidium@9111: * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. rubidium@9111: * rubidium@9111: * Markus F.X.J. Oberhumer rubidium@9111: * rubidium@9111: * http://www.oberhumer.com/opensource/lzo/ rubidium@9111: * 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: 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: /* 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 */