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 (
1313)
1414
1515const (
16- minCompressionLevel = - 2 // flate.HuffmanOnly
16+ minCompressionLevel = - 2 // flate.HuffmanOnly not defined in Go < 1.6
1717 maxCompressionLevel = flate .BestCompression
1818 defaultCompressionLevel = 1
1919)
Original file line number Diff line number Diff line change @@ -1065,10 +1065,8 @@ func (c *Conn) EnableWriteCompression(enable bool) {
10651065
10661066// SetCompressionLevel sets the flate compression level for subsequent text and
10671067// 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.
10721070func (c * Conn ) SetCompressionLevel (level int ) error {
10731071 if ! isValidCompressionLevel (level ) {
10741072 return errors .New ("websocket: invalid compression level" )
You can’t perform that action at this time.
0 commit comments