-#ifdef ENABLE_LZMS_DEBUG
- LZMS_ASSERT(lz_sarray_get_pos(&ctx->lz_sarray) > 0);
- u32 curpos = lz_sarray_get_pos(&ctx->lz_sarray) - 1;
- for (u32 i = 0; i < num_matches; i++) {
- LZMS_ASSERT(matches[i].len <= ctx->window_size - curpos);
- LZMS_ASSERT(matches[i].offset > 0);
- LZMS_ASSERT(matches[i].offset <= curpos);
- LZMS_ASSERT(!memcmp(&ctx->window[curpos],
- &ctx->window[curpos - matches[i].offset],
- matches[i].len));
- if (i < num_matches - 1)
- LZMS_ASSERT(matches[i].len > matches[i + 1].len);