rewrite penalty update

suggested by @terrelln
This commit is contained in:
Yann Collet
2024-10-23 11:50:57 -07:00
parent 1ec5f9f1f6
commit 16450d0732
+1 -1
View File
@@ -161,7 +161,7 @@ static size_t ZSTD_splitBlock_byChunks(const void* src, size_t srcSize,
return pos;
} else {
mergeEvents(&fpstats->pastEvents, &fpstats->newEvents);
penalty = penalty - 1 + (penalty == 0);
if (penalty > 0) penalty--;
}
}
assert(pos == blockSizeMax);