deflate_constants: define constant for window order

This commit is contained in:
Eric Biggers 2021-12-31 16:04:49 -06:00
parent dd42d1a001
commit 1f45d0b36a
2 changed files with 5 additions and 6 deletions

View File

@ -49,12 +49,8 @@
*/ */
#define USE_FULL_OFFSET_SLOT_FAST SUPPORT_NEAR_OPTIMAL_PARSING #define USE_FULL_OFFSET_SLOT_FAST SUPPORT_NEAR_OPTIMAL_PARSING
/* /* Include the needed matchfinders. */
* DEFLATE uses a 32768 byte sliding window; set the matchfinder parameters #define MATCHFINDER_WINDOW_ORDER DEFLATE_WINDOW_ORDER
* appropriately.
*/
#define MATCHFINDER_WINDOW_ORDER 15
#include "hc_matchfinder.h" #include "hc_matchfinder.h"
#if SUPPORT_NEAR_OPTIMAL_PARSING #if SUPPORT_NEAR_OPTIMAL_PARSING
# include "bt_matchfinder.h" # include "bt_matchfinder.h"

View File

@ -17,6 +17,9 @@
/* Maximum supported match offset (in bytes) */ /* Maximum supported match offset (in bytes) */
#define DEFLATE_MAX_MATCH_OFFSET 32768 #define DEFLATE_MAX_MATCH_OFFSET 32768
/* log2 of DEFLATE_MAX_MATCH_OFFSET */
#define DEFLATE_WINDOW_ORDER 15
/* Number of symbols in each Huffman code. Note: for the literal/length /* Number of symbols in each Huffman code. Note: for the literal/length
* and offset codes, these are actually the maximum values; a given block * and offset codes, these are actually the maximum values; a given block
* might use fewer symbols. */ * might use fewer symbols. */