]> wimlib.net Git - wimlib/blob - src/xpress.h
Allow writing to empty files in mounted WIM
[wimlib] / src / xpress.h
1 /*
2  * xpress.h
3  *
4  * wimlib - Library for working with WIM files 
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by the Free
8  * Software Foundation; either version 2.1 of the License, or (at your option) any
9  * later version.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13  * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License along
16  * with this library; if not, write to the Free Software Foundation, Inc., 59
17  * Temple Place, Suite 330, Boston, MA 02111-1307 USA 
18  */
19
20 #ifndef _WIMLIB_XPRESS_H
21 #define _WIMLIB_XPRESS_H
22
23 #include "util.h"
24
25 /* See the comments in xpress-decomp.c about the XPRESS format. */
26
27 //#define ENABLE_XPRESS_DEBUG
28 #ifdef ENABLE_XPRESS_DEBUG
29 #       define XPRESS_DEBUG DEBUG
30 #else
31 #       define XPRESS_DEBUG(format, ...)
32 #endif
33
34 #define XPRESS_NUM_CHARS        256
35 #define XPRESS_NUM_SYMBOLS      512
36 #define XPRESS_MAX_CODEWORD_LEN 15
37 #define XPRESS_TABLEBITS        12
38
39 #define XPRESS_MIN_MATCH        3
40 #define XPRESS_MAX_MATCH        255
41
42 extern int xpress_decompress(const void *__compressed_data, uint compressed_len, 
43                              void *__uncompressed_data, uint uncompressed_len);
44
45 extern int xpress_compress(const void *uncompressed_data, uint uncompressed_len,
46                            void *compressed_data, uint *compressed_len_ret);
47
48 #endif /* _WIMLIB_XPRESS_H */