File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
13
13
)
14
14
15
15
const (
16
- minCompressionLevel = - 2 // flate.HuffmanOnly
16
+ minCompressionLevel = - 2 // flate.HuffmanOnly not defined in Go < 1.6
17
17
maxCompressionLevel = flate .BestCompression
18
18
defaultCompressionLevel = 1
19
19
)
Original file line number Diff line number Diff line change @@ -1065,10 +1065,8 @@ func (c *Conn) EnableWriteCompression(enable bool) {
1065
1065
1066
1066
// SetCompressionLevel sets the flate compression level for subsequent text and
1067
1067
// binary messages. This function is a noop if compression was not negotiated
1068
- // with the peer. Valid levels range from -2 to 9. Level -1 uses the default
1069
- // compression level. Level -2 uses Huffman compression only, Level 0 does not
1070
- // attempt any compression. Levels 1 through 9 range from best speed to best
1071
- // compression.
1068
+ // with the peer. See the compress/flate package for a description of
1069
+ // compression levels.
1072
1070
func (c * Conn ) SetCompressionLevel (level int ) error {
1073
1071
if ! isValidCompressionLevel (level ) {
1074
1072
return errors .New ("websocket: invalid compression level" )
You can’t perform that action at this time.
0 commit comments