ZSTD_REP_NUM removed from ZSTD_storeSeq

This commit is contained in:
inikep
2016-03-16 12:03:07 +01:00
parent df164e6d35
commit 0ac4a551b9
2 changed files with 14 additions and 14 deletions
+5 -5
View File
@@ -688,7 +688,7 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
#endif
ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset + ZSTD_REP_NUM - 1, mlen-minMatch);
anchor = ip = ip + mlen;
} /* for (cur=0; cur < last_pos; ) */
@@ -702,7 +702,7 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
rep[0] = best_off;
ZSTD_LOG_ENCODE("%d/%d: ENCODE REP literals=%d mlen=%d off=%d rep1=%d rep2=%d\n", (int)(anchor-base), (int)(iend-base), (int)(0), (int)best_mlen, (int)(0), (int)rep[0], (int)rep[1]);
ZSTD_updatePrice(seqStorePtr, 0, anchor, 0, best_mlen);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, best_mlen);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0 + ZSTD_REP_NUM - 1, best_mlen);
anchor += best_mlen+minMatch;
continue; /* faster when present ... (?) */
}
@@ -1036,7 +1036,7 @@ _storeSequence: // cur, last_pos, best_mlen, best_off have to be set
#endif
ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset + ZSTD_REP_NUM - 1, mlen-minMatch);
anchor = ip = ip + mlen;
}
@@ -1059,7 +1059,7 @@ _storeSequence: // cur, last_pos, best_mlen, best_off have to be set
offset = rep[1]; rep[1] = rep[0]; rep[0] = offset; /* swap offset history */
ZSTD_LOG_ENCODE("%d/%d: ENCODE REP literals=%d mlen=%d off=%d rep1=%d rep2=%d\n", (int)(anchor-base), (int)(iend-base), (int)(0), (int)best_mlen, (int)(0), (int)rep[0], (int)rep[1]);
ZSTD_updatePrice(seqStorePtr, 0, anchor, 0, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0 + ZSTD_REP_NUM - 1, mlen-minMatch);
anchor += mlen;
}
#else
@@ -1077,7 +1077,7 @@ _storeSequence: // cur, last_pos, best_mlen, best_off have to be set
offset = rep[1]; rep[1] = rep[0]; rep[0] = offset; /* swap offset history */
ZSTD_LOG_ENCODE("%d/%d: ENCODE REP literals=%d mlen=%d off=%d rep1=%d rep2=%d\n", (int)(anchor-base), (int)(iend-base), (int)(0), (int)best_mlen, (int)(0), (int)rep[0], (int)rep[1]);
ZSTD_updatePrice(seqStorePtr, 0, anchor, 0, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, mlen-minMatch);
ZSTD_storeSeq(seqStorePtr, 0, anchor, 0 + ZSTD_REP_NUM - 1, mlen-minMatch);
anchor += mlen;
continue; /* faster when present ... (?) */
}