mirror of
https://github.com/golang/go
synced 2024-11-19 20:24:41 -07:00
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
This commit is contained in:
parent
a287567d3c
commit
686ecd83c0
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user