]> wimlib.net Git - wimlib/commitdiff
bt_matchfinder: remove unnecessary max_len parameter to skip routine
authorEric Biggers <ebiggers3@gmail.com>
Sat, 11 Jun 2016 19:45:16 +0000 (14:45 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 11 Jun 2016 19:46:15 +0000 (14:46 -0500)
include/wimlib/bt_matchfinder.h
src/lzx_compress.c
src/xpress_compress.c

index 6a2e7edf14ab589568c88269c2f9516821d4bea7..39a2778b7d20971a37913d981c8e02085ca4cc4f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The following copying information applies to this specific source code file:
  *
- * Written in 2014-2015 by Eric Biggers <ebiggers3@gmail.com>
+ * Written in 2014-2016 by Eric Biggers <ebiggers3@gmail.com>
  *
  * To the extent possible under law, the author(s) have dedicated all copyright
  * and related and neighboring rights to this software to the public domain
@@ -244,8 +244,7 @@ TEMPLATED(bt_matchfinder_advance_one_byte)(struct TEMPLATED(bt_matchfinder) * co
                matchptr = &in_begin[cur_node];
 
                if (matchptr[len] == in_next[len]) {
-                       len = lz_extend(in_next, matchptr, len + 1,
-                                       (record_matches ? max_len : nice_len));
+                       len = lz_extend(in_next, matchptr, len + 1, max_len);
                        if (!record_matches || len > best_len) {
                                if (record_matches) {
                                        best_len = len;
@@ -357,7 +356,6 @@ static inline void
 TEMPLATED(bt_matchfinder_skip_position)(struct TEMPLATED(bt_matchfinder) *mf,
                                        const u8 *in_begin,
                                        ptrdiff_t cur_pos,
-                                       u32 max_len,
                                        u32 nice_len,
                                        u32 max_search_depth,
                                        u32 next_hashes[static 2])
@@ -366,7 +364,7 @@ TEMPLATED(bt_matchfinder_skip_position)(struct TEMPLATED(bt_matchfinder) *mf,
        TEMPLATED(bt_matchfinder_advance_one_byte)(mf,
                                                   in_begin,
                                                   cur_pos,
-                                                  max_len,
+                                                  nice_len,
                                                   nice_len,
                                                   max_search_depth,
                                                   next_hashes,
index 6a631db9ae37f7738fccd3e1b544e28c99dcb75e..19e2daa2a97de024115e4b65ff0097661cd05a73 100644 (file)
@@ -1883,7 +1883,6 @@ lzx_compress_near_optimal(struct lzx_compressor *c,
                                                   bt_matchfinder_skip_position,
                                                   in_begin,
                                                   in_next - in_begin,
-                                                  max_len,
                                                   nice_len,
                                                   c->max_search_depth,
                                                   next_hashes);
index edc126d9310e3b10a6eb49895b393dd3f8c96708..d8cb7697deb9732eeab7a4e33c1d6093abb618fc 100644 (file)
@@ -964,7 +964,6 @@ xpress_find_matches(struct xpress_compressor * restrict c,
                                bt_matchfinder_skip_position(&c->bt_mf,
                                                             in_begin,
                                                             in_next - in_begin,
-                                                            max_len,
                                                             nice_len,
                                                             c->max_search_depth,
                                                             next_hashes);