support for ZSTD_REP_NUM == 1 and ZSTD_REP_NUM == 4

This commit is contained in:
inikep
2016-03-17 11:21:00 +01:00
parent 5945308983
commit 7d1742825b
4 changed files with 30 additions and 11 deletions
+4 -4
View File
@@ -420,8 +420,8 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
U32 cur, match_num, last_pos, litlen, price;
/* init */
U32 rep[ZSTD_REP_NUM];
for (int i=0; i<ZSTD_REP_NUM; i++)
U32 rep[ZSTD_REP_NUM+1];
for (int i=0; i<ZSTD_REP_NUM+1; i++)
rep[i]=REPCODE_STARTVALUE;
ctx->nextToUpdate3 = ctx->nextToUpdate;
@@ -748,8 +748,8 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
U32 cur, match_num, last_pos, litlen, price;
/* init */
U32 rep[ZSTD_REP_NUM];
for (int i=0; i<ZSTD_REP_NUM; i++)
U32 rep[ZSTD_REP_NUM+1];
for (int i=0; i<ZSTD_REP_NUM+1; i++)
rep[i]=REPCODE_STARTVALUE;
ctx->nextToUpdate3 = ctx->nextToUpdate;