#define LZX_MAX_MATCHES_PER_POS (LZX_MAX_MATCH_LEN - LZX_MIN_MATCH_LEN + 1)
/* Codewords for the LZX main, length, and aligned offset Huffman codes */
#define LZX_MAX_MATCHES_PER_POS (LZX_MAX_MATCH_LEN - LZX_MIN_MATCH_LEN + 1)
/* Codewords for the LZX main, length, and aligned offset Huffman codes */
* subsequent passes. This is suboptimal because different matches may
* be preferred with different cost models, but seems to be a worthwhile
* speedup. */
* subsequent passes. This is suboptimal because different matches may
* be preferred with different cost models, but seems to be a worthwhile
* speedup. */
* value is the number of matches found. */
static unsigned
lzx_get_matches(struct lzx_compressor *ctx,
* value is the number of matches found. */
static unsigned
lzx_get_matches(struct lzx_compressor *ctx,
lzx_match_chooser_reverse_list(struct lzx_compressor *ctx, unsigned cur_pos)
{
unsigned prev_link, saved_prev_link;
lzx_match_chooser_reverse_list(struct lzx_compressor *ctx, unsigned cur_pos)
{
unsigned prev_link, saved_prev_link;
{ .len = ctx->optimum_cur_idx,
.offset = ctx->optimum[0].next.match_offset,
};
{ .len = ctx->optimum_cur_idx,
.offset = ctx->optimum[0].next.match_offset,
};
* The return value is a (length, offset) pair specifying the match or literal
* chosen. For literals, the length is 0 or 1 and the offset is meaningless.
*/
* The return value is a (length, offset) pair specifying the match or literal
* chosen. For literals, the length is 0 or 1 and the offset is meaningless.
*/
/* If there's a long match with a recent offset, take it. */
if (longest_rep_len >= ctx->params.alg_params.slow.nice_match_length) {
lzx_skip_bytes(ctx, longest_rep_len);
/* If there's a long match with a recent offset, take it. */
if (longest_rep_len >= ctx->params.alg_params.slow.nice_match_length) {
lzx_skip_bytes(ctx, longest_rep_len);
- if (raw_match.len >= LZX_MIN_MATCH_LEN) {
- lzx_tally_match(raw_match.len, raw_match.offset,
+ if (lz_match.len >= LZX_MIN_MATCH_LEN) {
+ lzx_tally_match(lz_match.len, lz_match.offset,
- if (raw_match.len >= LZX_MIN_MATCH_LEN) {
- lzx_item.data = lzx_tally_match(raw_match.len,
- raw_match.offset,
+ if (lz_match.len >= LZX_MIN_MATCH_LEN) {
+ lzx_item.data = lzx_tally_match(lz_match.len,
+ lz_match.offset,