Commit 686ecd83 authored by Nigel Tao's avatar Nigel Tao

image/png: make the CompressionLevel constants negative, reserving

positive numbers to mean a numeric zlib compression level.

LGTM=bradfitz, ruiu
R=bradfitz, ruiu
CC=golang-codereviews, jeff.allen
https://golang.org/cl/138860043
parent a287567d
...@@ -33,10 +33,13 @@ type encoder struct { ...@@ -33,10 +33,13 @@ type encoder struct {
type CompressionLevel int type CompressionLevel int
const ( const (
DefaultCompression CompressionLevel = iota DefaultCompression CompressionLevel = 0
NoCompression NoCompression CompressionLevel = -1
BestSpeed BestSpeed CompressionLevel = -2
BestCompression BestCompression CompressionLevel = -3
// Positive CompressionLevel values are reserved to mean a numeric zlib
// compression level, although that is not implemented yet.
) )
// Big-endian. // Big-endian.
......
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