00001 /* $Id: minilzo.h 8987 2007-03-03 04:04:22Z belugas $ */ 00002 00003 /* @file minilzo.h -- mini subset of the LZO real-time data compression library 00004 00005 This file is part of the LZO real-time data compression library. 00006 00007 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 00008 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 00009 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 00010 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 00011 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 00012 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 00013 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 00014 All Rights Reserved. 00015 00016 The LZO library is free software; you can redistribute it and/or 00017 modify it under the terms of the GNU General Public License as 00018 published by the Free Software Foundation; either version 2 of 00019 the License, or (at your option) any later version. 00020 00021 The LZO library is distributed in the hope that it will be useful, 00022 but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 GNU General Public License for more details. 00025 00026 You should have received a copy of the GNU General Public License 00027 along with the LZO library; see the file COPYING. 00028 If not, write to the Free Software Foundation, Inc., 00029 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00030 00031 Markus F.X.J. Oberhumer 00032 <markus@oberhumer.com> 00033 http://www.oberhumer.com/opensource/lzo/ 00034 */ 00035 00036 /* 00037 * NOTE: 00038 * the full LZO package can be found at 00039 * http://www.oberhumer.com/opensource/lzo/ 00040 */ 00041 00042 00043 #ifndef MINILZO_H 00044 #define MINILZO_H 00045 00046 #define MINILZO_VERSION 0x1080 00047 00048 #ifdef __LZOCONF_H 00049 # error "you cannot use both LZO and miniLZO" 00050 #endif 00051 00052 #undef LZO_HAVE_CONFIG_H 00053 #include "lzoconf.h" 00054 00055 #if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) 00056 # error "version mismatch in header files" 00057 #endif 00058 00059 00060 #ifdef __cplusplus 00061 extern "C" { 00062 #endif 00063 00064 00065 /* Memory required for the wrkmem parameter. 00066 * When the required size is 0, you can also pass a NULL pointer. 00067 */ 00068 00069 #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS 00070 #define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) 00071 #define LZO1X_MEM_DECOMPRESS (0) 00072 00073 00074 /* compression */ 00075 LZO_EXTERN(int) 00076 lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len, 00077 lzo_byte *dst, lzo_uintp dst_len, 00078 lzo_voidp wrkmem ); 00079 00080 /* decompression */ 00081 LZO_EXTERN(int) 00082 lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len, 00083 lzo_byte *dst, lzo_uintp dst_len, 00084 lzo_voidp wrkmem /* NOT USED */ ); 00085 00086 /* safe decompression with overrun testing */ 00087 LZO_EXTERN(int) 00088 lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len, 00089 lzo_byte *dst, lzo_uintp dst_len, 00090 lzo_voidp wrkmem /* NOT USED */ ); 00091 00092 00093 #ifdef __cplusplus 00094 } /* extern "C" */ 00095 #endif 00096 00097 #endif /* MINILZO_H */