LZO1X.H (3798B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* lzo1x.h -- public interface of the LZO1X compression algorithm 17 18 This file is part of the LZO real-time data compression library. 19 20 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 21 22 The LZO library is free software; you can redistribute it and/or 23 modify it under the terms of the GNU Library General Public 24 License as published by the Free Software Foundation; either 25 version 2 of the License, or (at your option) any later version. 26 27 The LZO library is distributed in the hope that it will be useful, 28 but WITHOUT ANY WARRANTY; without even the implied warranty of 29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 30 Library General Public License for more details. 31 32 You should have received a copy of the GNU Library General Public 33 License along with the LZO library; see the file COPYING.LIB. 34 If not, write to the Free Software Foundation, Inc., 35 675 Mass Ave, Cambridge, MA 02139, USA. 36 37 Markus F.X.J. Oberhumer 38 markus.oberhumer@jk.uni-linz.ac.at 39 */ 40 41 42 #ifndef __LZO1X_H 43 #define __LZO1X_H 44 45 #include "lzoconf.h" 46 47 //#ifdef __cplusplus 48 //extern "C" { 49 //#endif 50 51 52 /*********************************************************************** 53 // 54 ************************************************************************/ 55 56 /* Memory required for the wrkmem parameter. 57 * When the required size is 0, you can also pass a NULL pointer. 58 */ 59 60 #define LZO1X_MEM_COMPRESS ((lzo_uint) (16384L * sizeof(lzo_byte *))) 61 #define LZO1X_MEM_DECOMPRESS (0) 62 63 64 /* fast decompression */ 65 LZO_EXTERN(int) 66 lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len, 67 lzo_byte *dst, lzo_uint *dst_len, 68 lzo_voidp wrkmem /* NOT USED */ ); 69 70 /* safe decompression with overrun testing */ 71 LZO_EXTERN(int) 72 lzo1x_decompress_x ( const lzo_byte *src, lzo_uint src_len, 73 lzo_byte *dst, lzo_uint *dst_len, 74 lzo_voidp wrkmem /* NOT USED */ ); 75 76 77 /*********************************************************************** 78 // 79 ************************************************************************/ 80 81 LZO_EXTERN(int) 82 lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len, 83 lzo_byte *dst, lzo_uint *dst_len, 84 lzo_voidp wrkmem ); 85 86 87 /*********************************************************************** 88 // better compression ratio at the cost of more memory and time 89 ************************************************************************/ 90 91 #define LZO1X_999_MEM_COMPRESS ((lzo_uint) (14 * 16384L * sizeof(short))) 92 93 LZO_EXTERN(int) 94 lzo1x_999_compress ( const lzo_byte *src, lzo_uint src_len, 95 lzo_byte *dst, lzo_uint *dst_len, 96 lzo_voidp wrkmem ); 97 98 99 //#ifdef __cplusplus 100 //} /* extern "C" */ 101 //#endif 102 103 #endif /* already included */ 104 105 /* 106 vi:ts=4 107 */