- /* Update LRU queues */
- if (ctx->prev_lz_offset != 0) {
- for (int i = LZMS_NUM_RECENT_OFFSETS - 1; i >= 0; i--)
- ctx->recent_lz_offsets[i + 1] = ctx->recent_lz_offsets[i];
- ctx->recent_lz_offsets[0] = ctx->prev_lz_offset;
- }
-
- if (ctx->prev_delta_offset != 0) {
- for (int i = LZMS_NUM_RECENT_OFFSETS - 1; i >= 0; i--) {
- ctx->recent_delta_powers[i + 1] = ctx->recent_delta_powers[i];
- ctx->recent_delta_offsets[i + 1] = ctx->recent_delta_offsets[i];
- }
- ctx->recent_delta_powers[0] = ctx->prev_delta_power;
- ctx->recent_delta_offsets[0] = ctx->prev_delta_offset;
- }
-
- ctx->prev_lz_offset = ctx->upcoming_lz_offset;
- ctx->prev_delta_offset = ctx->upcoming_delta_offset;
- ctx->prev_delta_power = ctx->upcoming_delta_power;