update:
zc->nextToUpdate = (matchEndIdx > current + 8) ? matchEndIdx - 8 : current+1;
- return bestLength;
+ return (bestLength>=minMatch) ? bestLength : 0;
}
}
/* save best solution */
- if (currentMl > ml) { ml = currentMl; *offsetPtr = ZSTD_REP_MOVE + current - matchIndex; if (ip+currentMl == iLimit) return ml; /* best possible, and avoid read overflow*/ }
+ if (currentMl > ml) { ml = currentMl; *offsetPtr = ZSTD_REP_MOVE + current - matchIndex; if (ip+currentMl == iLimit) return (ml>=minMatch) ? ml : 0; /* best possible, and avoid read overflow*/ }
}
}
matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask);
}
- return ml;
+ return (ml>=minMatch) ? ml : 0;
}
{ 14, 14, 14, 1, 4, 4, ZSTD_fast }, /* level 1 */
{ 14, 14, 15, 1, 4, 4, ZSTD_fast }, /* level 2 */
{ 14, 14, 14, 4, 4, 4, ZSTD_greedy }, /* level 3.*/
-#if 1
+#if 0
{ 14, 14, 14, 3, 3, 4, ZSTD_lazy }, /* level 4.*/
{ 14, 14, 14, 4, 3, 4, ZSTD_lazy2 }, /* level 5 */
{ 14, 14, 14, 5, 3, 4, ZSTD_lazy2 }, /* level 6 */