mirror of
https://github.com/facebook/zstd.git
synced 2025-10-19 00:05:29 -04:00
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 offset=999999;
|
||||||
size_t matchLength = ZSTD_HC_HcFindBestMatch_selectMLS(ctx, ip, iend, &offset, maxSearches, mls);
|
size_t matchLength = ZSTD_HC_HcFindBestMatch_selectMLS(ctx, ip, iend, &offset, maxSearches, mls);
|
||||||
if (!matchLength) { ip++; continue; }
|
if (!matchLength) { ip++; continue; }
|
||||||
|
while ((ip>anchor) && (ip-offset>ctx->base) && (ip[-1] == ip[-1-offset])) { ip--; } /* catch up */
|
||||||
/* store sequence */
|
/* store sequence */
|
||||||
{
|
{
|
||||||
size_t litLength = ip-anchor;
|
size_t litLength = ip-anchor;
|
||||||
|
@ -997,7 +997,7 @@ int main(int argc, char** argv)
|
|||||||
argument++;
|
argument++;
|
||||||
while ((*argument>= '0') && (*argument<='9'))
|
while ((*argument>= '0') && (*argument<='9'))
|
||||||
cLevel *= 10, cLevel += *argument++ - '0';
|
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;
|
if (cLevel > ZSTD_HC_MAX_CLEVEL) cLevel = ZSTD_HC_MAX_CLEVEL;
|
||||||
g_params = g_seedParams[cLevel];
|
g_params = g_seedParams[cLevel];
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user