};
/* 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"
}
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);
.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,
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;
}