Skip to content

Commit

Permalink
image/png: make the CompressionLevel constants negative, reserving
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nigeltao committed Sep 1, 2014
1 parent a287567 commit 686ecd8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pkg/image/png/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ type encoder struct {
type CompressionLevel int

const (
DefaultCompression CompressionLevel = iota
NoCompression
BestSpeed
BestCompression
DefaultCompression CompressionLevel = 0
NoCompression CompressionLevel = -1
BestSpeed CompressionLevel = -2
BestCompression CompressionLevel = -3

// Positive CompressionLevel values are reserved to mean a numeric zlib
// compression level, although that is not implemented yet.
)

// Big-endian.
Expand Down

0 comments on commit 686ecd8

Please sign in to comment.