summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/zstd.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/zstd.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/zstd.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/zstd.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go
index 57a8a2f5b..5e0b64ccc 100644
--- a/vendor/github.com/klauspost/compress/zstd/zstd.go
+++ b/vendor/github.com/klauspost/compress/zstd/zstd.go
@@ -6,11 +6,20 @@ package zstd
import (
"errors"
"log"
+ "math"
"math/bits"
)
+// enable debug printing
const debug = false
+
+// Enable extra assertions.
+const debugAsserts = debug || false
+
+// print sequence details
const debugSequences = false
+
+// print detailed matching information
const debugMatches = false
// force encoder to use predefined tables.
@@ -19,6 +28,9 @@ const forcePreDef = false
// zstdMinMatch is the minimum zstd match length.
const zstdMinMatch = 3
+// Reset the buffer offset when reaching this.
+const bufferReset = math.MaxInt32 - MaxWindowSize
+
var (
// ErrReservedBlockType is returned when a reserved block type is found.
// Typically this indicates wrong or corrupted input.