]> Cypherpunks repositories - gostls13.git/commit
compress: make flate, gzip and zlib's NewWriterXxx functions all return
authorNigel Tao <nigeltao@golang.org>
Fri, 10 Feb 2012 07:49:19 +0000 (18:49 +1100)
committerNigel Tao <nigeltao@golang.org>
Fri, 10 Feb 2012 07:49:19 +0000 (18:49 +1100)
commitcc9ed447d0afd1f5ff32bf30e094624cb704549b
tree7376f3bfc6e18a08a5a38ff83e7467b2d761a23a
parent0bc6836e81223a82653c44a4a6023e762a1e51cc
compress: make flate, gzip and zlib's NewWriterXxx functions all return
(*Writer, error) if they take a compression level, and *Writer otherwise.
Rename gzip's Compressor and Decompressor to Writer and Reader, similar to
flate and zlib.

Clarify commentary when writing gzip metadata that is not representable
as Latin-1, and fix io.EOF comment bug.

Also refactor gzip_test to be more straightforward.

Fixes #2839.

R=rsc, r, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5639057
14 files changed:
doc/go1.html
doc/go1.tmpl
src/pkg/archive/zip/writer.go
src/pkg/compress/flate/deflate.go
src/pkg/compress/flate/deflate_test.go
src/pkg/compress/gzip/gunzip.go
src/pkg/compress/gzip/gzip.go
src/pkg/compress/gzip/gzip_test.go
src/pkg/compress/zlib/writer.go
src/pkg/compress/zlib/writer_test.go
src/pkg/crypto/rand/rand_test.go
src/pkg/image/png/writer.go
src/pkg/net/http/response_test.go
src/pkg/net/http/transport_test.go