diff options
author | Joe Tsai <joetsai@digital-static.net> | 2016-04-01 18:11:26 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-02 20:10:42 +0000 |
commit | 0d40dfa745b176a83d91cf0981bdbd3a92e2e547 (patch) | |
tree | d422e309d347a81510e047ca7b126bbc21cf074b /src/compress/gzip/gunzip_test.go | |
parent | ac8d97b6796aad8ca33db9d377064ddb3952a834 (diff) | |
download | go-0d40dfa745b176a83d91cf0981bdbd3a92e2e547.tar.gz go-0d40dfa745b176a83d91cf0981bdbd3a92e2e547.zip |
compress/gzip: cleanup gzip package
Changes made:
* Reader.flg is not used anywhere else other than readHeader and
does not need to be stored.
* Store Reader.digest and Writer.digest as uint32s rather than as
a hash.Hash32 and use the crc32.Update function instead. This simplifies
initialization logic since the zero value of uint32 is the initial
CRC-32 value. There are no performance detriments to doing this since
the hash.Hash32 returned by crc32 simply calls crc32.Update as well.
* s/[0:/[:/ Consistently use shorter notation for slicing.
* s/RFC1952/RFC 1952/ Consistently use RFC notation.
Change-Id: I55416a19f4836cbed943adaa3f672538ea5d166d
Reviewed-on: https://go-review.googlesource.com/21429
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Joe Tsai <joetsai@digital-static.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/compress/gzip/gunzip_test.go')
-rw-r--r-- | src/compress/gzip/gunzip_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compress/gzip/gunzip_test.go b/src/compress/gzip/gunzip_test.go index 007d9585ce..593644ac1b 100644 --- a/src/compress/gzip/gunzip_test.go +++ b/src/compress/gzip/gunzip_test.go @@ -411,7 +411,7 @@ Found: } func TestNilStream(t *testing.T) { - // Go liberally interprets RFC1952 section 2.2 to mean that a gzip file + // Go liberally interprets RFC 1952 section 2.2 to mean that a gzip file // consist of zero or more members. Thus, we test that a nil stream is okay. _, err := NewReader(bytes.NewReader(nil)) if err != io.EOF { |