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