]> wimlib.net Git - wimlib/blobdiff - src/lzx_compress.c
hc_matchfinder: sync with libdeflate
[wimlib] / src / lzx_compress.c
index 110db5dd3fc7eaf87a2e2d1991bc1d174bebd7b1..89031d4e6b2dafee3f209c52479f9b30f1b9e717 100644 (file)
@@ -2569,7 +2569,7 @@ lzx_compress_lazy(struct lzx_compressor * restrict c,
                        cur_len = CALL_HC_MF(is_16_bit, c,
                                             hc_matchfinder_longest_match,
                                             in_begin,
-                                            in_next - in_begin,
+                                            in_next,
                                             2,
                                             max_len,
                                             nice_len,
@@ -2646,7 +2646,7 @@ lzx_compress_lazy(struct lzx_compressor * restrict c,
                        next_len = CALL_HC_MF(is_16_bit, c,
                                              hc_matchfinder_longest_match,
                                              in_begin,
-                                             in_next - in_begin,
+                                             in_next,
                                              cur_len - 2,
                                              max_len,
                                              nice_len,
@@ -2707,13 +2707,14 @@ lzx_compress_lazy(struct lzx_compressor * restrict c,
                        lzx_choose_match(c, cur_len, cur_adjusted_offset,
                                         recent_offsets, is_16_bit,
                                         &litrunlen, &next_seq);
-                       in_next = CALL_HC_MF(is_16_bit, c,
-                                            hc_matchfinder_skip_positions,
-                                            in_begin,
-                                            in_next - in_begin,
-                                            in_end - in_begin,
-                                            skip_len,
-                                            next_hashes);
+                       CALL_HC_MF(is_16_bit, c,
+                                  hc_matchfinder_skip_bytes,
+                                  in_begin,
+                                  in_next,
+                                  in_end,
+                                  skip_len,
+                                  next_hashes);
+                       in_next += skip_len;
 
                        /* Keep going until it's time to end the block. */
                } while (in_next < in_max_block_end &&