aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/compress/gzip/gzip.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/compress/gzip/gzip.go')
-rw-r--r--libgo/go/compress/gzip/gzip.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/libgo/go/compress/gzip/gzip.go b/libgo/go/compress/gzip/gzip.go
index 5131d128e4e..4d945e47fe8 100644
--- a/libgo/go/compress/gzip/gzip.go
+++ b/libgo/go/compress/gzip/gzip.go
@@ -25,7 +25,7 @@ const (
// A Writer is an io.WriteCloser.
// Writes to a Writer are compressed and written to w.
type Writer struct {
- Header
+ Header // written at first call to Write, Flush, or Close
w io.Writer
level int
wroteHeader bool
@@ -44,10 +44,7 @@ type Writer struct {
// Writes may be buffered and not flushed until Close.
//
// Callers that wish to set the fields in Writer.Header must do so before
-// the first call to Write or Close. The Comment and Name header fields are
-// UTF-8 strings in Go, but the underlying format requires NUL-terminated ISO
-// 8859-1 (Latin-1). NUL or non-Latin-1 runes in those strings will lead to an
-// error on Write.
+// the first call to Write, Flush, or Close.
func NewWriter(w io.Writer) *Writer {
z, _ := NewWriterLevel(w, DefaultCompression)
return z