Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
lzo1x.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : Command & Conquer *
24 * *
25 * $Archive:: /Commando/Library/lzo1x.h $*
26 * *
27 * $Author:: Greg_h $*
28 * *
29 * $Modtime:: 7/22/97 11:37a $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37/* lzo1x.h -- public interface of the LZO1X compression algorithm
38
39 This file is part of the LZO real-time data compression library.
40
41 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
42
43 The LZO library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Library General Public
45 License as published by the Free Software Foundation; either
46 version 2 of the License, or (at your option) any later version.
47
48 The LZO library is distributed in the hope that it will be useful,
49 but WITHOUT ANY WARRANTY; without even the implied warranty of
50 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
51 Library General Public License for more details.
52
53 You should have received a copy of the GNU Library General Public
54 License along with the LZO library; see the file COPYING.LIB.
55 If not, write to the Free Software Foundation, Inc.,
56 675 Mass Ave, Cambridge, MA 02139, USA.
57
58 Markus F.X.J. Oberhumer
59 markus.oberhumer@jk.uni-linz.ac.at
60 */
61
62
63#ifndef __LZO1X_H
64#define __LZO1X_H
65
66#include "lzoconf.h"
67
68//#ifdef __cplusplus
69//extern "C" {
70//#endif
71
72
73/***********************************************************************
74//
75************************************************************************/
76
77/* Memory required for the wrkmem parameter.
78 * When the required size is 0, you can also pass a NULL pointer.
79 */
80
81#define LZO1X_MEM_COMPRESS ((lzo_uint) (16384L * sizeof(lzo_byte *)))
82#define LZO1X_MEM_DECOMPRESS (0)
83
84
85/* fast decompression */
86LZO_EXTERN(int)
87lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len,
88 lzo_byte *dst, lzo_uint *dst_len,
89 lzo_voidp wrkmem /* NOT USED */ );
90
91/* safe decompression with overrun testing */
92LZO_EXTERN(int)
93lzo1x_decompress_x ( const lzo_byte *src, lzo_uint src_len,
94 lzo_byte *dst, lzo_uint *dst_len,
95 lzo_voidp wrkmem /* NOT USED */ );
96
97
98/***********************************************************************
99//
100************************************************************************/
101
102LZO_EXTERN(int)
103lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len,
104 lzo_byte *dst, lzo_uint *dst_len,
105 lzo_voidp wrkmem );
106
107
108/***********************************************************************
109// better compression ratio at the cost of more memory and time
110************************************************************************/
111
112#define LZO1X_999_MEM_COMPRESS ((lzo_uint) (14 * 16384L * sizeof(short)))
113
114LZO_EXTERN(int)
116 lzo_byte *dst, lzo_uint *dst_len,
117 lzo_voidp wrkmem );
118
119
120//#ifdef __cplusplus
121//} /* extern "C" */
122//#endif
123
124#endif /* already included */
125
126/*
127vi:ts=4
128*/
lzo1x_999_compress(const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem)
lzo1x_decompress(const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem)
Definition lzo1x_d.cpp:82
lzo1x_decompress_x(const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem)
int lzo1x_1_compress(const lzo_byte *in, lzo_uint in_len, lzo_byte *out, lzo_uint *out_len, lzo_voidp wrkmem)
Definition lzo1x_c.cpp:335
#define lzo_voidp
Definition lzoconf.h:128
#define LZO_EXTERN(_rettype)
Definition lzoconf.h:163
#define lzo_byte
Definition lzoconf.h:127
unsigned int lzo_uint
Definition lzoconf.h:99