mirror of
https://github.com/golang/go
synced 2024-11-25 01:17:56 -07:00
compress/flate: fix a typo, improve compression rate by 3-4%.
R=rsc CC=golang-dev https://golang.org/cl/5556077
This commit is contained in:
parent
68daa41d1b
commit
4d3b9d9757
@ -112,7 +112,7 @@ func (d *compressor) fillDeflate(b []byte) int {
|
||||
d.hashHead[i] = v
|
||||
}
|
||||
for i, h := range d.hashPrev {
|
||||
v := -h - windowSize
|
||||
v := h - windowSize
|
||||
if v < -1 {
|
||||
v = -1
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ var deflateInflateStringTests = []deflateInflateStringTest{
|
||||
{
|
||||
"../testdata/Mark.Twain-Tom.Sawyer.txt",
|
||||
"Mark.Twain-Tom.Sawyer",
|
||||
[...]int{416188, 191483, 185232, 179560, 175233, 171263, 169908, 169758, 169712, 169712},
|
||||
[...]int{407330, 187598, 180361, 172974, 169160, 163476, 160936, 160506, 160295, 160295},
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user