Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1616)

Issue 1166041: code review 1166041: compress: renamings. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 11 months ago by r
Modified:
14 years, 11 months ago
Reviewers:
cw
CC:
rsc, golang-dev
Visibility:
Public.

Description

compress: renamings. NewDeflater -> NewWriter NewInflater -> NewReader Deflater -> Compressor Inflater -> Decompressor

Patch Set 1 #

Patch Set 2 : code review 1166041: compress: renamings. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -159 lines) Patch
M src/pkg/compress/flate/deflate.go View 10 chunks +16 lines, -16 lines 0 comments Download
M src/pkg/compress/flate/deflate_test.go View 2 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/compress/flate/flate_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/compress/flate/huffman_bit_writer.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/compress/flate/inflate.go View 10 chunks +16 lines, -16 lines 0 comments Download
M src/pkg/compress/gzip/gunzip.go View 1 8 chunks +25 lines, -25 lines 0 comments Download
M src/pkg/compress/gzip/gunzip_test.go View 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/compress/gzip/gzip.go View 1 6 chunks +27 lines, -27 lines 0 comments Download
M src/pkg/compress/gzip/gzip_test.go View 2 chunks +26 lines, -26 lines 0 comments Download
M src/pkg/compress/zlib/reader.go View 5 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/compress/zlib/reader_test.go View 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/compress/zlib/writer.go View 4 chunks +14 lines, -14 lines 0 comments Download
M src/pkg/compress/zlib/writer_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/rand/rand_test.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/image/png/reader.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/image/png/writer.go View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/patch/git.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 11 months ago (2010-05-07 21:21:56 UTC) #1
rsc1
LGTM
14 years, 11 months ago (2010-05-07 21:24:29 UTC) #2
r
*** Submitted as http://code.google.com/p/go/source/detail?r=5190b0c2de56 *** compress: renamings. NewDeflater -> NewWriter NewInflater -> NewReader Deflater -> ...
14 years, 11 months ago (2010-05-07 21:32:36 UTC) #3
cw
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
r2
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


Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b