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