Commit 7cd6cae6 authored by Joe Tsai's avatar Joe Tsai Committed by Joe Tsai

compress/flate: use seperate const block for exported constants

As rendered on https://tip.golang.org/pkg/compress/flate/, there is an
extra new-line because of the unexported constants in the same block.

<<<
const (
    NoCompression      = 0
    BestSpeed          = 1
    BestCompression    = 9
    DefaultCompression = -1
    HuffmanOnly        = -2 // Disables match search and only does Huffman entropy reduction.

)
>>>

Instead, seperate the exported compression level constants into its own
const block. This is both more readable and also fixes the issue.

Change-Id: I60b7966c83fb53356c02e4640d05f55a3bee35b7
Reviewed-on: https://go-review.googlesource.com/23557Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 4223294e
......@@ -16,9 +16,12 @@ const (
BestCompression = 9
DefaultCompression = -1
HuffmanOnly = -2 // Disables match search and only does Huffman entropy reduction.
logWindowSize = 15
windowSize = 1 << logWindowSize
windowMask = windowSize - 1
)
const (
logWindowSize = 15
windowSize = 1 << logWindowSize
windowMask = windowSize - 1
// The LZ77 step produces a sequence of literal tokens and <length, offset>
// pair tokens. The offset is also known as distance. The underlying wire
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment