]> wimlib.net Git - wimlib/blobdiff - src/lzx-compress.c
Replace num_fast_bytes => nice_match_length
[wimlib] / src / lzx-compress.c
index 25712476b7aa6241d0134d1617ec716ae96703b1..2cce4441708e5027632ac60c2226a3d56ee5df68 100644 (file)
@@ -265,8 +265,8 @@ struct lzx_block_spec {
 };
 
 /* Include template for the match-choosing algorithm.  */
-#define LZ_COMPRESSOR  struct lzx_compressor
-#define LZ_FORMAT_STATE        struct lzx_lru_queue
+#define LZ_COMPRESSOR          struct lzx_compressor
+#define LZ_ADAPTIVE_STATE      struct lzx_lru_queue
 struct lzx_compressor;
 #include "wimlib/lz_optimal.h"
 
@@ -1199,7 +1199,8 @@ lzx_lz_get_matches_caching(struct lzx_compressor *ctx,
 }
 
 static u32
-lzx_get_prev_literal_cost(struct lzx_compressor *ctx)
+lzx_get_prev_literal_cost(struct lzx_compressor *ctx,
+                         struct lzx_lru_queue *queue)
 {
        return lzx_literal_cost(ctx->window[ctx->match_window_pos - 1],
                                &ctx->costs);
@@ -1674,7 +1675,7 @@ lzx_create_compressor(size_t window_size,
                .alg_params = {
                        .slow = {
                                .use_len2_matches = 1,
-                               .num_fast_bytes = 32,
+                               .nice_match_length = 32,
                                .num_optim_passes = 2,
                                .max_search_depth = 50,
                                .max_matches_per_pos = 3,
@@ -1740,7 +1741,7 @@ lzx_create_compressor(size_t window_size,
        if (params->algorithm == WIMLIB_LZX_ALGORITHM_SLOW) {
                if (!lz_match_chooser_init(&ctx->mc,
                                           LZX_OPTIM_ARRAY_SIZE,
-                                          params->alg_params.slow.num_fast_bytes,
+                                          params->alg_params.slow.nice_match_length,
                                           LZX_MAX_MATCH_LEN))
                        goto oom;
        }