Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
4d3b9d97
Commit
4d3b9d97
authored
Jan 21, 2012
by
Ivan Krasin
Committed by
Russ Cox
Jan 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compress/flate: fix a typo, improve compression rate by 3-4%.
R=rsc CC=golang-dev
https://golang.org/cl/5556077
parent
68daa41d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/pkg/compress/flate/deflate.go
src/pkg/compress/flate/deflate.go
+1
-1
src/pkg/compress/flate/deflate_test.go
src/pkg/compress/flate/deflate_test.go
+1
-1
No files found.
src/pkg/compress/flate/deflate.go
View file @
4d3b9d97
...
@@ -112,7 +112,7 @@ func (d *compressor) fillDeflate(b []byte) int {
...
@@ -112,7 +112,7 @@ func (d *compressor) fillDeflate(b []byte) int {
d
.
hashHead
[
i
]
=
v
d
.
hashHead
[
i
]
=
v
}
}
for
i
,
h
:=
range
d
.
hashPrev
{
for
i
,
h
:=
range
d
.
hashPrev
{
v
:=
-
h
-
windowSize
v
:=
h
-
windowSize
if
v
<
-
1
{
if
v
<
-
1
{
v
=
-
1
v
=
-
1
}
}
...
...
src/pkg/compress/flate/deflate_test.go
View file @
4d3b9d97
...
@@ -291,7 +291,7 @@ var deflateInflateStringTests = []deflateInflateStringTest{
...
@@ -291,7 +291,7 @@ var deflateInflateStringTests = []deflateInflateStringTest{
{
{
"../testdata/Mark.Twain-Tom.Sawyer.txt"
,
"../testdata/Mark.Twain-Tom.Sawyer.txt"
,
"Mark.Twain-Tom.Sawyer"
,
"Mark.Twain-Tom.Sawyer"
,
[
...
]
int
{
4
16188
,
191483
,
185232
,
179560
,
175233
,
171263
,
169908
,
169758
,
169712
,
169712
},
[
...
]
int
{
4
07330
,
187598
,
180361
,
172974
,
169160
,
163476
,
160936
,
160506
,
160295
,
160295
},
},
},
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment