]> wimlib.net Git - wimlib/blob - src/xpress.h
update_lte_of_staging_file(): Use BUILD_BUG_ON
[wimlib] / src / xpress.h
1 #ifndef _WIMLIB_XPRESS_H
2 #define _WIMLIB_XPRESS_H
3
4 #include "util.h"
5
6 /* See the comments in xpress-decompress.c about the XPRESS format. */
7
8 //#define ENABLE_XPRESS_DEBUG
9 #ifdef ENABLE_XPRESS_DEBUG
10 #       define XPRESS_DEBUG DEBUG
11 #else
12 #       define XPRESS_DEBUG(format, ...)
13 #endif
14
15 #define XPRESS_NUM_CHARS        256
16 #define XPRESS_NUM_SYMBOLS      512
17 #define XPRESS_MAX_CODEWORD_LEN 15
18 #define XPRESS_TABLEBITS        12
19
20 #define XPRESS_END_OF_DATA      256
21
22 #define XPRESS_MIN_OFFSET       1
23 #define XPRESS_MAX_OFFSET       65535
24
25 #define XPRESS_MIN_MATCH        3
26 #define XPRESS_MAX_MATCH        65538
27
28 extern int xpress_decompress(const void *__compressed_data, unsigned compressed_len,
29                              void *__uncompressed_data, unsigned uncompressed_len);
30
31 extern int xpress_compress(const void *uncompressed_data, unsigned uncompressed_len,
32                            void *compressed_data, unsigned *compressed_len_ret);
33
34 #endif /* _WIMLIB_XPRESS_H */