]> Cypherpunks repositories - gostls13.git/commit
compress/flate: level 1 (best speed) match across blocks
authorKlaus Post <klauspost@gmail.com>
Sat, 22 Oct 2016 16:50:02 +0000 (18:50 +0200)
committerNigel Tao <nigeltao@golang.org>
Thu, 27 Oct 2016 00:50:06 +0000 (00:50 +0000)
commit2e196b15b94e48009369aae25299a59cbc7d45f4
treef2c06fd21279c637cd2f5bd05fb1a407a1861ee4
parentf8a3444388a223eb4db9df61c07fd15e142e7044
compress/flate: level 1 (best speed) match across blocks

This change makes deflate level 1 (best speed) match across
block boundaries. This comes at a small speed penalty,
but improves compression on almost all output.

Sample numbers on various content types:

enwik9:            391052014 ->  382578469 bytes, 77.59 -> 74.28 MB/s
adresser.001:       57269799 ->   47756095 bytes, 287.84 -> 357.86 MB/s
10gb:             5233055166 -> 5198328382 bytes, 105.85 -> 96.99 MB/s
rawstudio-mint14: 3972329211 -> 3927423364 bytes, 100.07 -> 94.22 MB/s
sites:             165556800 ->  163178702 bytes, 72.31 -> 70.15 MB/s
objectfiles:       115962472 ->  111649524 bytes, 132.60 -> 128.05 MB/s
sharnd.out:        200015283 ->  200015283 bytes, 221.50 -> 218.83 MB/s

Change-Id: I62a139e5c06976e803439a4268acede5139b8cfc
Reviewed-on: https://go-review.googlesource.com/31640
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
src/compress/flate/deflate.go
src/compress/flate/deflate_test.go
src/compress/flate/deflatefast.go