_storeSequence:
{
if (offset >= ZSTD_REP_NUM) {
-#if ZSTD_REP_NUM > 3
- rep[3] = rep[2];
-#endif
rep[2] = rep[1];
rep[1] = rep[0];
rep[0] = offset - ZSTD_REP_MOVE;
} else {
if (offset != 0) {
size_t temp = rep[offset];
-#if ZSTD_REP_NUM > 3
- if (offset > 2) rep[3] = rep[2];
-#endif
if (offset > 1) rep[2] = rep[1];
if (offset > 0) rep[1] = rep[0];
rep[0] = temp;
if (offset != 0) {
size_t temp = seqState->prevOffset[offset];
if (offset != 1) {
-#if ZSTD_REP_NUM > 3
- if (offset == 3) seqState->prevOffset[3] = seqState->prevOffset[2];
-#endif
seqState->prevOffset[2] = seqState->prevOffset[1];
}
seqState->prevOffset[1] = seqState->prevOffset[0];
}
} else {
offset -= ZSTD_REP_MOVE;
-#if ZSTD_REP_NUM > 3
- seqState->prevOffset[3] = seqState->prevOffset[2];
-#endif
seqState->prevOffset[2] = seqState->prevOffset[1];
seqState->prevOffset[1] = seqState->prevOffset[0];
seqState->prevOffset[0] = offset;
mlen = opt[cur].mlen;
if (opt[cur].off >= ZSTD_REP_NUM) {
-#if ZSTD_REP_NUM > 3
- opt[cur].rep[3] = opt[cur-mlen].rep[2];
-#endif
opt[cur].rep[2] = opt[cur-mlen].rep[1];
opt[cur].rep[1] = opt[cur-mlen].rep[0];
opt[cur].rep[0] = 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 {
-#if ZSTD_REP_NUM > 3
- opt[cur].rep[3] = (opt[cur].off > 2) ? opt[cur-mlen].rep[2] : opt[cur-mlen].rep[3];
-#endif
opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2];
opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1];
opt[cur].rep[0] = opt[cur-mlen].rep[opt[cur].off];
ZSTD_LOG_ENCODE("%d/%d: ENCODE literals=%d mlen=%d off=%d rep1=%d rep[1]=%d\n", (int)(ip-base), (int)(iend-base), (int)(litLength), (int)mlen, (int)(offset), (int)rep[0], (int)rep[1]);
if (offset >= ZSTD_REP_NUM) {
-#if ZSTD_REP_NUM > 3
- rep[3] = rep[2];
-#endif
rep[2] = rep[1];
rep[1] = rep[0];
rep[0] = offset - ZSTD_REP_MOVE;
} else {
if (offset != 0) {
size_t temp = rep[offset];
- if (offset != 1) {
-#if ZSTD_REP_NUM > 3
- if (offset == 3) rep[3] = rep[2];
-#endif
- rep[2] = rep[1];
- }
+ if (offset != 1) rep[2] = rep[1];
rep[1] = rep[0];
rep[0] = temp;
}