2 * matchfinder_nonsliding.h
4 * Definitions for nonsliding window matchfinders.
6 * "Nonsliding window" means that any prior sequence can be matched.
9 #if MATCHFINDER_WINDOW_ORDER <= 16
15 #if MATCHFINDER_WINDOW_ORDER != 16 && MATCHFINDER_WINDOW_ORDER != 32
17 /* Not all the bits of the position type are needed, so the sign bit can be
18 * reserved to mean "out of bounds". */
19 #define MATCHFINDER_INITVAL ((pos_t)-1)
22 matchfinder_match_in_window(pos_t cur_match, const u8 *in_base, const u8 *in_next)
24 return !(cur_match & ((pos_t)1 << (sizeof(pos_t) * 8 - 1)));
29 /* All bits of the position type are needed, so use 0 to mean "out of bounds".
30 * This prevents the beginning of the buffer from matching anything; however,
31 * this doesn't matter much. */
33 #define MATCHFINDER_INITVAL ((pos_t)0)
36 matchfinder_match_in_window(pos_t cur_match, const u8 *in_base, const u8 *in_next)
38 return cur_match != 0;
44 matchfinder_slot_for_match(pos_t cur_match)