summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/fse_encoder.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-03-04 16:53:39 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-03-04 16:53:39 -0500
commit0015c376a300ed5aaf5170f90159736a9e58212e (patch)
tree8282f254d1e12690a1b09d34d97b519c2e89a656 /vendor/github.com/klauspost/compress/zstd/fse_encoder.go
parent797da2a57b43d1190dd1fb6ec78dcc9ec76c3bd3 (diff)
downloadpodman-0015c376a300ed5aaf5170f90159736a9e58212e.tar.gz
podman-0015c376a300ed5aaf5170f90159736a9e58212e.tar.bz2
podman-0015c376a300ed5aaf5170f90159736a9e58212e.zip
Vendor buildah 1.14.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/fse_encoder.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/fse_encoder.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/fse_encoder.go b/vendor/github.com/klauspost/compress/zstd/fse_encoder.go
index 619836f52..aa9eba88b 100644
--- a/vendor/github.com/klauspost/compress/zstd/fse_encoder.go
+++ b/vendor/github.com/klauspost/compress/zstd/fse_encoder.go
@@ -327,7 +327,7 @@ func (s *fseEncoder) normalizeCount(length int) error {
if err != nil {
return err
}
- if debug {
+ if debugAsserts {
err = s.validateNorm()
if err != nil {
return err
@@ -336,7 +336,7 @@ func (s *fseEncoder) normalizeCount(length int) error {
return s.buildCTable()
}
s.norm[largest] += stillToDistribute
- if debug {
+ if debugAsserts {
err := s.validateNorm()
if err != nil {
return err
@@ -619,7 +619,7 @@ func (s *fseEncoder) writeCount(out []byte) ([]byte, error) {
func (s *fseEncoder) bitCost(symbolValue uint8, accuracyLog uint32) uint32 {
minNbBits := s.ct.symbolTT[symbolValue].deltaNbBits >> 16
threshold := (minNbBits + 1) << 16
- if debug {
+ if debugAsserts {
if !(s.actualTableLog < 16) {
panic("!s.actualTableLog < 16")
}
@@ -633,7 +633,7 @@ func (s *fseEncoder) bitCost(symbolValue uint8, accuracyLog uint32) uint32 {
// linear interpolation (very approximate)
normalizedDeltaFromThreshold := (deltaFromThreshold << accuracyLog) >> s.actualTableLog
bitMultiplier := uint32(1) << accuracyLog
- if debug {
+ if debugAsserts {
if s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold {
panic("s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold")
}