A little too late... This is confusing still. NewWriter ... is that something that writes ...
14 years, 11 months ago
(2010-05-08 06:30:39 UTC)
#4
A little too late...
This is confusing still.
NewWriter ... is that something that writes a compressed stream from an
uncompressed stream or the reverse? At least NewDeflator seemed clearer.
Why not NewCompressor?
On May 7, 2010, at 11:30 PM, cw@f00f.org wrote: > A little too late... > ...
14 years, 11 months ago
(2010-05-08 13:39:23 UTC)
#5
On May 7, 2010, at 11:30 PM, cw@f00f.org wrote:
> A little too late...
>
> This is confusing still.
>
> NewWriter ... is that something that writes a compressed stream from an
> uncompressed stream or the reverse? At least NewDeflator seemed
> clearer.
>
> Why not NewCompressor?
Because you get a Writer back. It's not confusing if you think of it from the
client's view: gzip.NewWriter writes a gzip; gzip.NewReader reads one. If you
want to compress data into a gzip, that's a write; if you want to decompress,
that's a read. It doesn't make much sense to write an uncompressed stream from
a compressed one.
-rob
Issue 1166041: code review 1166041: compress: renamings.
(Closed)
Created 14 years, 11 months ago by r
Modified 14 years, 11 months ago
Reviewers: cw
Base URL:
Comments: 0