Switch != ZSTD_extDict to == ZSTD_noDict
This commit is contained in:
@@ -425,7 +425,7 @@ static U32 ZSTD_insertBt1(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) {
|
if ((dictMode == ZSTD_noDict) || (matchIndex+matchLength >= dictLimit)) {
|
||||||
assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */
|
assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */
|
||||||
match = base + matchIndex;
|
match = base + matchIndex;
|
||||||
matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend);
|
matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend);
|
||||||
@@ -581,7 +581,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
|
|||||||
if ((matchIndex3 > windowLow)
|
if ((matchIndex3 > windowLow)
|
||||||
& (current - matchIndex3 < (1<<18)) /*heuristic : longer distance likely too expensive*/ ) {
|
& (current - matchIndex3 < (1<<18)) /*heuristic : longer distance likely too expensive*/ ) {
|
||||||
size_t mlen;
|
size_t mlen;
|
||||||
if ((dictMode != ZSTD_extDict) /*static*/ || (matchIndex3 >= dictLimit)) {
|
if ((dictMode == ZSTD_noDict) /*static*/ || (matchIndex3 >= dictLimit)) {
|
||||||
const BYTE* const match = base + matchIndex3;
|
const BYTE* const match = base + matchIndex3;
|
||||||
mlen = ZSTD_count(ip, match, iLimit);
|
mlen = ZSTD_count(ip, match, iLimit);
|
||||||
} else {
|
} else {
|
||||||
@@ -613,7 +613,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
|
|||||||
const BYTE* match;
|
const BYTE* match;
|
||||||
assert(current > matchIndex);
|
assert(current > matchIndex);
|
||||||
|
|
||||||
if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) {
|
if ((dictMode == ZSTD_noDict) || (matchIndex+matchLength >= dictLimit)) {
|
||||||
assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */
|
assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */
|
||||||
match = base + matchIndex;
|
match = base + matchIndex;
|
||||||
matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit);
|
matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit);
|
||||||
|
|||||||
Reference in New Issue
Block a user