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
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/
39 #include <ucl/uclconf.h>
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
66 #define ucl_compress_config_p ucl_compress_config_t __UCL_MMODEL *
69 /***********************************************************************
71 ************************************************************************/
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
,
78 const struct ucl_compress_config_p conf
,
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
,
86 const struct ucl_compress_config_p conf
,
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
,
94 const struct ucl_compress_config_p conf
,
98 /***********************************************************************
100 ************************************************************************/
103 ucl_nrv2b_decompress_8 ( const ucl_bytep src
, ucl_uint src_len
,
104 ucl_bytep dst
, ucl_uintp dst_len
,
107 ucl_nrv2b_decompress_le16 ( const ucl_bytep src
, ucl_uint src_len
,
108 ucl_bytep dst
, ucl_uintp dst_len
,
111 ucl_nrv2b_decompress_le32 ( const ucl_bytep src
, ucl_uint src_len
,
112 ucl_bytep dst
, ucl_uintp dst_len
,
115 ucl_nrv2b_decompress_safe_8 ( const ucl_bytep src
, ucl_uint src_len
,
116 ucl_bytep dst
, ucl_uintp dst_len
,
119 ucl_nrv2b_decompress_safe_le16 ( const ucl_bytep src
, ucl_uint src_len
,
120 ucl_bytep dst
, ucl_uintp dst_len
,
123 ucl_nrv2b_decompress_safe_le32 ( const ucl_bytep src
, ucl_uint src_len
,
124 ucl_bytep dst
, ucl_uintp dst_len
,
128 ucl_nrv2d_decompress_8 ( const ucl_bytep src
, ucl_uint src_len
,
129 ucl_bytep dst
, ucl_uintp dst_len
,
132 ucl_nrv2d_decompress_le16 ( const ucl_bytep src
, ucl_uint src_len
,
133 ucl_bytep dst
, ucl_uintp dst_len
,
136 ucl_nrv2d_decompress_le32 ( const ucl_bytep src
, ucl_uint src_len
,
137 ucl_bytep dst
, ucl_uintp dst_len
,
140 ucl_nrv2d_decompress_safe_8 ( const ucl_bytep src
, ucl_uint src_len
,
141 ucl_bytep dst
, ucl_uintp dst_len
,
144 ucl_nrv2d_decompress_safe_le16 ( const ucl_bytep src
, ucl_uint src_len
,
145 ucl_bytep dst
, ucl_uintp dst_len
,
148 ucl_nrv2d_decompress_safe_le32 ( const ucl_bytep src
, ucl_uint src_len
,
149 ucl_bytep dst
, ucl_uintp dst_len
,
153 ucl_nrv2e_decompress_8 ( const ucl_bytep src
, ucl_uint src_len
,
154 ucl_bytep dst
, ucl_uintp dst_len
,
157 ucl_nrv2e_decompress_le16 ( const ucl_bytep src
, ucl_uint src_len
,
158 ucl_bytep dst
, ucl_uintp dst_len
,
161 ucl_nrv2e_decompress_le32 ( const ucl_bytep src
, ucl_uint src_len
,
162 ucl_bytep dst
, ucl_uintp dst_len
,
165 ucl_nrv2e_decompress_safe_8 ( const ucl_bytep src
, ucl_uint src_len
,
166 ucl_bytep dst
, ucl_uintp dst_len
,
169 ucl_nrv2e_decompress_safe_le16 ( const ucl_bytep src
, ucl_uint src_len
,
170 ucl_bytep dst
, ucl_uintp dst_len
,
173 ucl_nrv2e_decompress_safe_le32 ( const ucl_bytep src
, ucl_uint src_len
,
174 ucl_bytep dst
, ucl_uintp dst_len
,
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 ************************************************************************/
191 ucl_nrv2b_test_overlap_8 ( const ucl_bytep buf
, ucl_uint src_off
,
192 ucl_uint src_len
, ucl_uintp dst_len
,
195 ucl_nrv2b_test_overlap_le16 ( const ucl_bytep buf
, ucl_uint src_off
,
196 ucl_uint src_len
, ucl_uintp dst_len
,
199 ucl_nrv2b_test_overlap_le32 ( const ucl_bytep buf
, ucl_uint src_off
,
200 ucl_uint src_len
, ucl_uintp dst_len
,
204 ucl_nrv2d_test_overlap_8 ( const ucl_bytep buf
, ucl_uint src_off
,
205 ucl_uint src_len
, ucl_uintp dst_len
,
208 ucl_nrv2d_test_overlap_le16 ( const ucl_bytep buf
, ucl_uint src_off
,
209 ucl_uint src_len
, ucl_uintp dst_len
,
212 ucl_nrv2d_test_overlap_le32 ( const ucl_bytep buf
, ucl_uint src_off
,
213 ucl_uint src_len
, ucl_uintp dst_len
,
217 ucl_nrv2e_test_overlap_8 ( const ucl_bytep buf
, ucl_uint src_off
,
218 ucl_uint src_len
, ucl_uintp dst_len
,
221 ucl_nrv2e_test_overlap_le16 ( const ucl_bytep buf
, ucl_uint src_off
,
222 ucl_uint src_len
, ucl_uintp dst_len
,
225 ucl_nrv2e_test_overlap_le32 ( const ucl_bytep buf
, ucl_uint src_off
,
226 ucl_uint src_len
, ucl_uintp dst_len
,
234 #endif /* already included */