]> wimlib.net Git - wimlib/blobdiff - include/wimlib/lzx_constants.h
lzx_compress: optimize storing information in lzx_sequence
[wimlib] / include / wimlib / lzx_constants.h
index 788eded8cd03376a7cc2e239601f860362808c49..1f802d816796e2f707f476249574ba387d7e431b 100644 (file)
@@ -21,6 +21,9 @@
 #define LZX_NUM_PRIMARY_LENS   7
 #define LZX_NUM_LEN_HEADERS    (LZX_NUM_PRIMARY_LENS + 1)
 
+/* The first length which requires a length symbol.  */
+#define LZX_MIN_SECONDARY_LEN  (LZX_MIN_MATCH_LEN + LZX_NUM_PRIMARY_LENS)
+
 /* Valid values of the 3-bit block type field.  */
 #define LZX_BLOCKTYPE_VERBATIM       1
 #define LZX_BLOCKTYPE_ALIGNED        2
 /* The offset slot base for LZX_MIN_ALIGNED_OFFSET_SLOT.  */
 #define LZX_MIN_ALIGNED_OFFSET         14
 
+/* The maximum number of extra offset bits in verbatim blocks.  (One would need
+ * to subtract LZX_NUM_ALIGNED_OFFSET_BITS to get the number of extra offset
+ * bits in *aligned* blocks.)  */
+#define LZX_MAX_NUM_EXTRA_BITS         17
+
 /* Maximum lengths (in bits) for length-limited Huffman code construction.  */
 #define LZX_MAX_MAIN_CODEWORD_LEN      16
 #define LZX_MAX_LEN_CODEWORD_LEN       16