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) 2005 Markus Franz Xaver Johannes Oberhumer 00006 Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer 00007 Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer 00008 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 00009 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 00010 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 00011 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 00012 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 00013 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 00014 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 00015 All Rights Reserved. 00016 00017 The LZO library is free software; you can redistribute it and/or 00018 modify it under the terms of the GNU General Public License, 00019 version 2, as published by the Free Software Foundation. 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 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 0x2020 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 /*********************************************************************** 00066 // 00067 ************************************************************************/ 00068 00069 /* Memory required for the wrkmem parameter. 00070 * When the required size is 0, you can also pass a NULL pointer. 00071 */ 00072 00073 #define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS 00074 #define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) 00075 #define LZO1X_MEM_DECOMPRESS (0) 00076 00077 00078 /* compression */ 00079 LZO_EXTERN(int) 00080 lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, 00081 lzo_bytep dst, lzo_uintp dst_len, 00082 lzo_voidp wrkmem ); 00083 00084 /* decompression */ 00085 LZO_EXTERN(int) 00086 lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, 00087 lzo_bytep dst, lzo_uintp dst_len, 00088 lzo_voidp wrkmem /* NOT USED */ ); 00089 00090 /* safe decompression with overrun testing */ 00091 LZO_EXTERN(int) 00092 lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, 00093 lzo_bytep dst, lzo_uintp dst_len, 00094 lzo_voidp wrkmem /* NOT USED */ ); 00095 00096 00097 #ifdef __cplusplus 00098 } /* extern "C" */ 00099 #endif 00100 00101 #endif /* already included */ 00102
1.7.2