renamed savedRep into repToConfirm
This commit is contained in:
@@ -63,7 +63,7 @@ struct ZSTD_CCtx_s {
|
|||||||
U32 loadedDictEnd;
|
U32 loadedDictEnd;
|
||||||
ZSTD_compressionStage_e stage;
|
ZSTD_compressionStage_e stage;
|
||||||
U32 rep[ZSTD_REP_NUM];
|
U32 rep[ZSTD_REP_NUM];
|
||||||
U32 savedRep[ZSTD_REP_NUM];
|
U32 repToConfirm[ZSTD_REP_NUM];
|
||||||
U32 dictID;
|
U32 dictID;
|
||||||
ZSTD_parameters params;
|
ZSTD_parameters params;
|
||||||
void* workSpace;
|
void* workSpace;
|
||||||
@@ -742,7 +742,7 @@ _check_compressibility:
|
|||||||
if ((size_t)(op-ostart) >= maxCSize) return 0; }
|
if ((size_t)(op-ostart) >= maxCSize) return 0; }
|
||||||
|
|
||||||
/* confirm repcodes */
|
/* confirm repcodes */
|
||||||
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) zc->rep[i] = zc->savedRep[i]; }
|
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) zc->rep[i] = zc->repToConfirm[i]; }
|
||||||
|
|
||||||
return op - ostart;
|
return op - ostart;
|
||||||
}
|
}
|
||||||
@@ -1011,8 +1011,8 @@ void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
|
|||||||
} } }
|
} } }
|
||||||
|
|
||||||
/* save reps for next block */
|
/* save reps for next block */
|
||||||
cctx->savedRep[0] = offset_1 ? offset_1 : offsetSaved;
|
cctx->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
|
||||||
cctx->savedRep[1] = offset_2 ? offset_2 : offsetSaved;
|
cctx->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -1126,7 +1126,7 @@ static void ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
|
|||||||
} } }
|
} } }
|
||||||
|
|
||||||
/* save reps for next block */
|
/* save reps for next block */
|
||||||
ctx->savedRep[0] = offset_1; ctx->savedRep[1] = offset_2;
|
ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -1280,8 +1280,8 @@ void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
|
|||||||
} } }
|
} } }
|
||||||
|
|
||||||
/* save reps for next block */
|
/* save reps for next block */
|
||||||
cctx->savedRep[0] = offset_1 ? offset_1 : offsetSaved;
|
cctx->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
|
||||||
cctx->savedRep[1] = offset_2 ? offset_2 : offsetSaved;
|
cctx->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -1430,7 +1430,7 @@ static void ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_CCtx* ctx,
|
|||||||
} } }
|
} } }
|
||||||
|
|
||||||
/* save reps for next block */
|
/* save reps for next block */
|
||||||
ctx->savedRep[0] = offset_1; ctx->savedRep[1] = offset_2;
|
ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -1962,8 +1962,8 @@ _storeSequence:
|
|||||||
} }
|
} }
|
||||||
|
|
||||||
/* Save reps for next block */
|
/* Save reps for next block */
|
||||||
ctx->savedRep[0] = offset_1 ? offset_1 : savedOffset;
|
ctx->repToConfirm[0] = offset_1 ? offset_1 : savedOffset;
|
||||||
ctx->savedRep[1] = offset_2 ? offset_2 : savedOffset;
|
ctx->repToConfirm[1] = offset_2 ? offset_2 : savedOffset;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -2157,7 +2157,7 @@ _storeSequence:
|
|||||||
} }
|
} }
|
||||||
|
|
||||||
/* Save reps for next block */
|
/* Save reps for next block */
|
||||||
ctx->savedRep[0] = offset_1; ctx->savedRep[1] = offset_2;
|
ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
|
|||||||
} } /* for (cur=0; cur < last_pos; ) */
|
} } /* for (cur=0; cur < last_pos; ) */
|
||||||
|
|
||||||
/* Save reps for next block */
|
/* Save reps for next block */
|
||||||
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) ctx->savedRep[i] = rep[i]; }
|
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) ctx->repToConfirm[i] = rep[i]; }
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t const lastLLSize = iend - anchor;
|
{ size_t const lastLLSize = iend - anchor;
|
||||||
@@ -907,7 +907,7 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
|
|||||||
} } /* for (cur=0; cur < last_pos; ) */
|
} } /* for (cur=0; cur < last_pos; ) */
|
||||||
|
|
||||||
/* Save reps for next block */
|
/* Save reps for next block */
|
||||||
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) ctx->savedRep[i] = rep[i]; }
|
{ int i; for (i=0; i<ZSTD_REP_NUM; i++) ctx->repToConfirm[i] = rep[i]; }
|
||||||
|
|
||||||
/* Last Literals */
|
/* Last Literals */
|
||||||
{ size_t lastLLSize = iend - anchor;
|
{ size_t lastLLSize = iend - anchor;
|
||||||
|
|||||||
Reference in New Issue
Block a user