summaryrefslogtreecommitdiff
path: root/src/pkg/compress/flate/huffman_code.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/compress/flate/huffman_code.go')
-rw-r--r--src/pkg/compress/flate/huffman_code.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/compress/flate/huffman_code.go b/src/pkg/compress/flate/huffman_code.go
index c3cd482dc..484f7d6ab 100644
--- a/src/pkg/compress/flate/huffman_code.go
+++ b/src/pkg/compress/flate/huffman_code.go
@@ -73,22 +73,22 @@ func generateFixedLiteralEncoding() *huffmanEncoder {
switch {
case ch < 144:
// size 8, 000110000 .. 10111111
- bits = ch+48;
+ bits = ch + 48;
size = 8;
break;
case ch < 256:
// size 9, 110010000 .. 111111111
- bits = ch+400-144;
+ bits = ch + 400 - 144;
size = 9;
break;
case ch < 280:
// size 7, 0000000 .. 0010111
- bits = ch-256;
+ bits = ch - 256;
size = 7;
break;
default:
// size 8, 11000000 .. 11000111
- bits = ch+192-280;
+ bits = ch + 192 - 280;
size = 8;
}
codeBits[ch] = size;
@@ -115,7 +115,7 @@ func (h *huffmanEncoder) bitLength(freq []int32) int64 {
var total int64;
for i, f := range freq {
if f != 0 {
- total += int64(f)*int64(h.codeBits[i])
+ total += int64(f) * int64(h.codeBits[i])
}
}
return total;