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

Issue 4524070: compress/flate: fix Huffman tree bug (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by Ivan Krasin
Modified:
13 years, 3 months ago
Reviewers:
CC:
rsc, peterGo, imkrasin, golang-dev, aam
Visibility:
Public.

Description

compress/flate: fix Huffman tree bug Incorporate refactoring and a regression test from http://codereview.appspot.com/4538090/

Patch Set 1 #

Patch Set 2 : diff -r 96fb12b2040e https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 96fb12b2040e https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 4 : diff -r 96fb12b2040e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 96fb12b2040e https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 96fb12b2040e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -91 lines) Patch
M src/pkg/compress/flate/huffman_bit_writer.go View 1 2 3 4 5 7 chunks +39 lines, -51 lines 0 comments Download
M src/pkg/compress/flate/huffman_code.go View 1 1 chunk +6 lines, -1 line 0 comments Download
M src/pkg/compress/flate/inflate.go View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M src/pkg/compress/zlib/writer_test.go View 1 6 chunks +40 lines, -37 lines 0 comments Download

Messages

Total messages: 16
Ivan Krasin
This fix has been tested with zlib: krasin@li139-230:~$ cat t.go package main import ( "compress/zlib" ...
13 years, 11 months ago (2011-05-25 23:06:49 UTC) #1
aam
> The funny thing is that we have a bug inside inflate.go that does not ...
13 years, 11 months ago (2011-05-25 23:11:37 UTC) #2
rsc
> The funny thing is that we have a bug inside inflate.go that does not ...
13 years, 11 months ago (2011-05-25 23:17:18 UTC) #3
Ivan Krasin
On 2011/05/25 23:17:18, rsc wrote: > > The funny thing is that we have a ...
13 years, 11 months ago (2011-05-25 23:26:13 UTC) #4
Ivan Krasin
>>> import zlib >>> f = open('out3') >>> zlib.decompress(f.read()) 'test a reasonable sized string that ...
13 years, 11 months ago (2011-05-26 00:04:41 UTC) #5
Ivan Krasin
I've used this Go program to check: package main import ( "compress/zlib" "log" "fmt" "os" ...
13 years, 11 months ago (2011-05-26 00:11:19 UTC) #6
Ivan Krasin
If the fix is applied, krasin@li139-230:~$ ./v < out3 test a reasonable sized string that ...
13 years, 11 months ago (2011-05-26 00:12:41 UTC) #7
Ivan Krasin
On 2011/05/25 23:11:37, aam wrote: > > The funny thing is that we have a ...
13 years, 11 months ago (2011-05-26 00:14:32 UTC) #8
rsc
please change CL description to compress/flate: fix Huffman tree bug http://codereview.appspot.com/4524070/diff/7001/src/pkg/compress/flate/inflate.go File src/pkg/compress/flate/inflate.go (right): http://codereview.appspot.com/4524070/diff/7001/src/pkg/compress/flate/inflate.go#newcode80 ...
13 years, 11 months ago (2011-05-26 02:24:06 UTC) #9
peterGo
I ran a test with this CL and it seemed to solve this bug too. ...
13 years, 11 months ago (2011-05-26 02:56:43 UTC) #10
imkrasin
http://codereview.appspot.com/4524070/diff/7001/src/pkg/compress/flate/inflate.go File src/pkg/compress/flate/inflate.go (right): http://codereview.appspot.com/4524070/diff/7001/src/pkg/compress/flate/inflate.go#newcode80 src/pkg/compress/flate/inflate.go:80: // TODO(rsc): Return false sometimes. On 2011/05/26 02:24:06, rsc ...
13 years, 11 months ago (2011-05-26 04:41:23 UTC) #11
rsc
LGTM Thanks for working through this.
13 years, 11 months ago (2011-05-26 13:18:25 UTC) #12
aam
my randomized tests completed without errors (2 000 000 compress/decompress cycles) thanks! On Thu, May ...
13 years, 11 months ago (2011-05-26 14:17:01 UTC) #13
imkrasin
On 2011/05/26 13:18:25, rsc wrote: > LGTM > > Thanks for working through this. Russ, ...
13 years, 11 months ago (2011-05-26 20:59:13 UTC) #14
rsc
Will do, sorry for the delay.
13 years, 11 months ago (2011-05-26 21:01:58 UTC) #15
rsc
13 years, 11 months ago (2011-05-26 21:02:16 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=0f0d1ba9a292 ***

compress/flate: fix Huffman tree bug
Incorporate refactoring and a regression test from
http://codereview.appspot.com/4538090/

R=rsc, go.peter.90, imkrasin
CC=golang-dev, mirtchovski
http://codereview.appspot.com/4524070

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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