mirror of
https://github.com/facebook/zstd.git
synced 2024-12-11 16:06:46 +08:00
restored bonus rule
This commit is contained in:
parent
69017bf253
commit
4cf0093571
@ -393,7 +393,7 @@ static U32 ZDICT_tryMerge(dictItem* table, dictItem elt, U32 eltNbToSkip, const
|
|||||||
table[u].length += addedLength;
|
table[u].length += addedLength;
|
||||||
table[u].pos = elt.pos;
|
table[u].pos = elt.pos;
|
||||||
table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */
|
table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */
|
||||||
// table[u].savings += elt.length / 8; /* rough approx bonus */
|
table[u].savings += elt.length / 8; /* rough approx bonus */
|
||||||
elt = table[u];
|
elt = table[u];
|
||||||
/* sort : improve rank */
|
/* sort : improve rank */
|
||||||
while ((u>1) && (table[u-1].savings < elt.savings))
|
while ((u>1) && (table[u-1].savings < elt.savings))
|
||||||
|
Loading…
Reference in New Issue
Block a user