]> wimlib.net Git - wimlib/blob - include/wimlib/lz.h
1b84fc47cbd3e467863b2c4d113f65e97d8e3ead
[wimlib] / include / wimlib / lz.h
1 #ifndef _WIMLIB_LZ_H
2 #define _WIMLIB_LZ_H
3
4 #include "wimlib/compress_common.h"
5
6 //#define ENABLE_LZ_DEBUG
7 #ifdef ENABLE_LZ_DEBUG
8 #  define LZ_ASSERT wimlib_assert
9 #  include "wimlib/assert.h"
10 #else
11 #  define LZ_ASSERT(...)
12 #endif
13
14
15 /* Raw LZ match/literal format: just a length and offset.
16  *
17  * The length is the number of bytes of the match, and the offset is the number
18  * of bytes back in the input the match is from the current position.
19  *
20  * This can alternatively be used to represent a literal byte if @len is less
21  * than the minimum match length.  */
22 struct raw_match {
23         input_idx_t len;
24         input_idx_t offset;
25 };
26
27 #endif /* _WIMLIB_LZ_H */