1
0
mirror of https://github.com/golang/go synced 2024-10-05 12:21:22 -06:00
go/src/pkg/compress
Adam Langley 9f0008bb93 compress/bzip2: support superfluous Huffman levels.
These should never be found in a bzip2 file but it does appear that
there's a buggy encoder that is producing them. Since the official
bzip2 handles this case, this change makes the Go code do likewise.

With this change, the code produces the same output as the official
bzip2 code on the invalid example given in the bug.

Fixes #7279.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/64010043
2014-02-14 17:17:19 -05:00
..
bzip2 compress/bzip2: support superfluous Huffman levels. 2014-02-14 17:17:19 -05:00
flate all: use {bytes,strings}.NewReader instead of bytes.Buffers 2014-01-27 11:05:01 -08:00
gzip all: use {bytes,strings}.NewReader instead of bytes.Buffers 2014-01-27 11:05:01 -08:00
lzw all: use {bytes,strings}.NewReader instead of bytes.Buffers 2014-01-27 11:05:01 -08:00
testdata compress/testdata: change {e,pi}.txt from 10k to 100k digits. 2012-05-09 10:02:28 +10:00
zlib all: use {bytes,strings}.NewReader instead of bytes.Buffers 2014-01-27 11:05:01 -08:00