2 * matchfinder_sliding.h
4 * Definitions for sliding window matchfinders.
6 * "Sliding window" means that only sequences beginning in the most recent
7 * MATCHFINDER_WINDOW_SIZE bytes can be matched.
10 #if MATCHFINDER_WINDOW_ORDER <= 15
16 #define MATCHFINDER_INITVAL ((pos_t)-MATCHFINDER_WINDOW_SIZE)
18 /* In the sliding window case, positions are stored relative to 'in_base'. */
21 matchfinder_match_in_window(pos_t cur_match, const u8 *in_base, const u8 *in_next)
23 return cur_match > (pos_t)((in_next - in_base) - MATCHFINDER_WINDOW_SIZE);
27 matchfinder_slot_for_match(pos_t cur_match)
29 return cur_match & (MATCHFINDER_WINDOW_SIZE - 1);