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