minor greedy mod
This commit is contained in:
parent
805a52a773
commit
444873f494
@ -794,6 +794,7 @@ size_t ZSTD_HC_compressBlock_greedy(ZSTD_HC_CCtx* ctx, void* dst, size_t maxDstS
|
||||
size_t offset=999999;
|
||||
size_t matchLength = ZSTD_HC_HcFindBestMatch_selectMLS(ctx, ip, iend, &offset, maxSearches, mls);
|
||||
if (!matchLength) { ip++; continue; }
|
||||
while ((ip>anchor) && (ip-offset>ctx->base) && (ip[-1] == ip[-1-offset])) { ip--; } /* catch up */
|
||||
/* store sequence */
|
||||
{
|
||||
size_t litLength = ip-anchor;
|
||||
|
@ -997,7 +997,7 @@ int main(int argc, char** argv)
|
||||
argument++;
|
||||
while ((*argument>= '0') && (*argument<='9'))
|
||||
cLevel *= 10, cLevel += *argument++ - '0';
|
||||
if (cLevel < 2) cLevel = 2;
|
||||
if (cLevel < 1) cLevel = 1;
|
||||
if (cLevel > ZSTD_HC_MAX_CLEVEL) cLevel = ZSTD_HC_MAX_CLEVEL;
|
||||
g_params = g_seedParams[cLevel];
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user