eq settings: fix the lang string used for the center band string
[maemo-rb.git] / tools / ucl / include / ucl / ucl.h
blob3eb37925c87eb7a6132a60293bbd7cd4511364c3
1 /* ucl.h -- prototypes for the UCL real-time data compression library
3 This file is part of the UCL data compression library.
5 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
6 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
7 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
8 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
9 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
10 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
11 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
12 All Rights Reserved.
14 The UCL library is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of
17 the License, or (at your option) any later version.
19 The UCL library is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with the UCL library; see the file COPYING.
26 If not, write to the Free Software Foundation, Inc.,
27 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 Markus F.X.J. Oberhumer
30 <markus@oberhumer.com>
31 http://www.oberhumer.com/opensource/ucl/
35 #ifndef __UCL_H
36 #define __UCL_H
38 #ifndef __UCLCONF_H
39 #include <ucl/uclconf.h>
40 #endif
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
47 /***********************************************************************
49 ************************************************************************/
51 /* note: to use default values pass -1, i.e. initialize
52 * this struct by a memset(x,0xff,sizeof(x)) */
53 struct ucl_compress_config_t
55 int bb_endian;
56 int bb_size;
57 ucl_uint max_offset;
58 ucl_uint max_match;
59 int s_level;
60 int h_level;
61 int p_level;
62 int c_flags;
63 ucl_uint m_size;
66 #define ucl_compress_config_p ucl_compress_config_t __UCL_MMODEL *
69 /***********************************************************************
70 // compressors
71 ************************************************************************/
73 UCL_EXTERN(int)
74 ucl_nrv2b_99_compress ( const ucl_bytep src, ucl_uint src_len,
75 ucl_bytep dst, ucl_uintp dst_len,
76 ucl_progress_callback_p cb,
77 int level,
78 const struct ucl_compress_config_p conf,
79 ucl_uintp result );
81 UCL_EXTERN(int)
82 ucl_nrv2d_99_compress ( const ucl_bytep src, ucl_uint src_len,
83 ucl_bytep dst, ucl_uintp dst_len,
84 ucl_progress_callback_p cb,
85 int level,
86 const struct ucl_compress_config_p conf,
87 ucl_uintp result );
89 UCL_EXTERN(int)
90 ucl_nrv2e_99_compress ( const ucl_bytep src, ucl_uint src_len,
91 ucl_bytep dst, ucl_uintp dst_len,
92 ucl_progress_callback_p cb,
93 int level,
94 const struct ucl_compress_config_p conf,
95 ucl_uintp result );
98 /***********************************************************************
99 // decompressors
100 ************************************************************************/
102 UCL_EXTERN(int)
103 ucl_nrv2b_decompress_8 ( const ucl_bytep src, ucl_uint src_len,
104 ucl_bytep dst, ucl_uintp dst_len,
105 ucl_voidp wrkmem );
106 UCL_EXTERN(int)
107 ucl_nrv2b_decompress_le16 ( const ucl_bytep src, ucl_uint src_len,
108 ucl_bytep dst, ucl_uintp dst_len,
109 ucl_voidp wrkmem );
110 UCL_EXTERN(int)
111 ucl_nrv2b_decompress_le32 ( const ucl_bytep src, ucl_uint src_len,
112 ucl_bytep dst, ucl_uintp dst_len,
113 ucl_voidp wrkmem );
114 UCL_EXTERN(int)
115 ucl_nrv2b_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len,
116 ucl_bytep dst, ucl_uintp dst_len,
117 ucl_voidp wrkmem );
118 UCL_EXTERN(int)
119 ucl_nrv2b_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len,
120 ucl_bytep dst, ucl_uintp dst_len,
121 ucl_voidp wrkmem );
122 UCL_EXTERN(int)
123 ucl_nrv2b_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len,
124 ucl_bytep dst, ucl_uintp dst_len,
125 ucl_voidp wrkmem );
127 UCL_EXTERN(int)
128 ucl_nrv2d_decompress_8 ( const ucl_bytep src, ucl_uint src_len,
129 ucl_bytep dst, ucl_uintp dst_len,
130 ucl_voidp wrkmem );
131 UCL_EXTERN(int)
132 ucl_nrv2d_decompress_le16 ( const ucl_bytep src, ucl_uint src_len,
133 ucl_bytep dst, ucl_uintp dst_len,
134 ucl_voidp wrkmem );
135 UCL_EXTERN(int)
136 ucl_nrv2d_decompress_le32 ( const ucl_bytep src, ucl_uint src_len,
137 ucl_bytep dst, ucl_uintp dst_len,
138 ucl_voidp wrkmem );
139 UCL_EXTERN(int)
140 ucl_nrv2d_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len,
141 ucl_bytep dst, ucl_uintp dst_len,
142 ucl_voidp wrkmem );
143 UCL_EXTERN(int)
144 ucl_nrv2d_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len,
145 ucl_bytep dst, ucl_uintp dst_len,
146 ucl_voidp wrkmem );
147 UCL_EXTERN(int)
148 ucl_nrv2d_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len,
149 ucl_bytep dst, ucl_uintp dst_len,
150 ucl_voidp wrkmem );
152 UCL_EXTERN(int)
153 ucl_nrv2e_decompress_8 ( const ucl_bytep src, ucl_uint src_len,
154 ucl_bytep dst, ucl_uintp dst_len,
155 ucl_voidp wrkmem );
156 UCL_EXTERN(int)
157 ucl_nrv2e_decompress_le16 ( const ucl_bytep src, ucl_uint src_len,
158 ucl_bytep dst, ucl_uintp dst_len,
159 ucl_voidp wrkmem );
160 UCL_EXTERN(int)
161 ucl_nrv2e_decompress_le32 ( const ucl_bytep src, ucl_uint src_len,
162 ucl_bytep dst, ucl_uintp dst_len,
163 ucl_voidp wrkmem );
164 UCL_EXTERN(int)
165 ucl_nrv2e_decompress_safe_8 ( const ucl_bytep src, ucl_uint src_len,
166 ucl_bytep dst, ucl_uintp dst_len,
167 ucl_voidp wrkmem );
168 UCL_EXTERN(int)
169 ucl_nrv2e_decompress_safe_le16 ( const ucl_bytep src, ucl_uint src_len,
170 ucl_bytep dst, ucl_uintp dst_len,
171 ucl_voidp wrkmem );
172 UCL_EXTERN(int)
173 ucl_nrv2e_decompress_safe_le32 ( const ucl_bytep src, ucl_uint src_len,
174 ucl_bytep dst, ucl_uintp dst_len,
175 ucl_voidp wrkmem );
178 /***********************************************************************
179 // assembler decompressors [TO BE ADDED]
180 ************************************************************************/
183 /***********************************************************************
184 // test an overlapping in-place decompression within a buffer:
185 // - try a virtual decompression from &buf[src_off] -> &buf[0]
186 // - no data is actually written
187 // - only the bytes at buf[src_off .. src_off+src_len] will get accessed
188 ************************************************************************/
190 UCL_EXTERN(int)
191 ucl_nrv2b_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off,
192 ucl_uint src_len, ucl_uintp dst_len,
193 ucl_voidp wrkmem );
194 UCL_EXTERN(int)
195 ucl_nrv2b_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off,
196 ucl_uint src_len, ucl_uintp dst_len,
197 ucl_voidp wrkmem );
198 UCL_EXTERN(int)
199 ucl_nrv2b_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off,
200 ucl_uint src_len, ucl_uintp dst_len,
201 ucl_voidp wrkmem );
203 UCL_EXTERN(int)
204 ucl_nrv2d_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off,
205 ucl_uint src_len, ucl_uintp dst_len,
206 ucl_voidp wrkmem );
207 UCL_EXTERN(int)
208 ucl_nrv2d_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off,
209 ucl_uint src_len, ucl_uintp dst_len,
210 ucl_voidp wrkmem );
211 UCL_EXTERN(int)
212 ucl_nrv2d_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off,
213 ucl_uint src_len, ucl_uintp dst_len,
214 ucl_voidp wrkmem );
216 UCL_EXTERN(int)
217 ucl_nrv2e_test_overlap_8 ( const ucl_bytep buf, ucl_uint src_off,
218 ucl_uint src_len, ucl_uintp dst_len,
219 ucl_voidp wrkmem );
220 UCL_EXTERN(int)
221 ucl_nrv2e_test_overlap_le16 ( const ucl_bytep buf, ucl_uint src_off,
222 ucl_uint src_len, ucl_uintp dst_len,
223 ucl_voidp wrkmem );
224 UCL_EXTERN(int)
225 ucl_nrv2e_test_overlap_le32 ( const ucl_bytep buf, ucl_uint src_off,
226 ucl_uint src_len, ucl_uintp dst_len,
227 ucl_voidp wrkmem );
230 #ifdef __cplusplus
231 } /* extern "C" */
232 #endif
234 #endif /* already included */