Skip to content

Commit

Permalink
minor greedy mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyan4973 committed Nov 6, 2015
1 parent 805a52a commit 444873f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/zstdhc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion programs/paramgrill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 444873f

Please sign in to comment.