From: inikep Date: Sat, 19 Mar 2016 14:32:21 +0000 (+0100) Subject: working kSlotNew for ZSTD_btopt X-Git-Tag: v0.6.0^2~17^2~16^2~8^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1269e2f7db27c7994b57c93b6bee63b64ab401e9;p=thirdparty%2Fzstd.git working kSlotNew for ZSTD_btopt --- diff --git a/lib/zstd_opt.h b/lib/zstd_opt.h index 69750aaaa..a978c72f7 100644 --- a/lib/zstd_opt.h +++ b/lib/zstd_opt.h @@ -528,7 +528,8 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx, if (opt[cur].off >= ZSTD_REP_NUM) { opt[cur].rep[3] = (kSlotNew < 3) ? opt[cur-mlen].rep[2] : opt[cur-mlen].rep[3]; opt[cur].rep[2] = (kSlotNew < 2) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2]; - opt[cur].rep[1] = (kSlotNew < 1) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1]; + opt[cur].rep[1] = (kSlotNew < 1) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1]; + opt[cur].rep[0] = opt[cur-mlen].rep[0]; opt[cur].rep[kSlotNew] = opt[cur].off - ZSTD_REP_MOVE; ZSTD_LOG_ENCODE("%d: COPYREP_OFF cur=%d mlen=%d rep=%d rep[1]=%d\n", (int)(inr-base), cur, mlen, opt[cur].rep[0], opt[cur].rep[1]); } else {