X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fhc_matchfinder.h;h=4c2c027159d1151d168405b32846fedeb2e5cfd1;hp=dd1cfab9dcde44df3005913e95d636db8411a3c5;hb=eea89b54f1000f00961a7154e526484c53479030;hpb=151463861a212a1ae7deae7e9844cd0cd1c4343c diff --git a/include/wimlib/hc_matchfinder.h b/include/wimlib/hc_matchfinder.h index dd1cfab9..4c2c0271 100644 --- a/include/wimlib/hc_matchfinder.h +++ b/include/wimlib/hc_matchfinder.h @@ -218,8 +218,11 @@ hc_matchfinder_longest_match(struct hc_matchfinder * const restrict mf, for (;;) { matchptr = &in_begin[cur_node]; - /* Already found a length 3 match. Try for a longer match; - * start by checking the last 2 bytes and the first 4 bytes. */ + /* Already found a length 3 match. Try for a longer + * match; start by checking either the last 4 bytes and + * the first 4 bytes, or the last byte. (The last byte, + * the one which would extend the match length by 1, is + * the most important.) */ #if UNALIGNED_ACCESS_IS_FAST if ((load_u32_unaligned(matchptr + best_len - 3) == load_u32_unaligned(in_next + best_len - 3)) &&