summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-09-22 05:54:49 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-09-23 14:12:37 -0400
commit54653ceebeabaf30e89d69e0f5aa5de431cc6bd7 (patch)
tree34efe49d86e9ba64c3a9ef7b2bdb22cb9cc3d37e /vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
parent25dc2759e10bf0293f14a2205291ab7dd53eccf4 (diff)
downloadpodman-54653ceebeabaf30e89d69e0f5aa5de431cc6bd7.tar.gz
podman-54653ceebeabaf30e89d69e0f5aa5de431cc6bd7.tar.bz2
podman-54653ceebeabaf30e89d69e0f5aa5de431cc6bd7.zip
Update vendor or containers/buildah
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/internal/snapref/encode_other.go')
-rw-r--r--vendor/github.com/klauspost/compress/internal/snapref/encode_other.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go b/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
index 511bba65d..298c4f8e9 100644
--- a/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
+++ b/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
@@ -18,6 +18,7 @@ func load64(b []byte, i int) uint64 {
// emitLiteral writes a literal chunk and returns the number of bytes written.
//
// It assumes that:
+//
// dst is long enough to hold the encoded bytes
// 1 <= len(lit) && len(lit) <= 65536
func emitLiteral(dst, lit []byte) int {
@@ -42,6 +43,7 @@ func emitLiteral(dst, lit []byte) int {
// emitCopy writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
+//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= 65535
// 4 <= length && length <= 65535
@@ -89,6 +91,7 @@ func emitCopy(dst []byte, offset, length int) int {
// src[i:i+k-j] and src[j:k] have the same contents.
//
// It assumes that:
+//
// 0 <= i && i < j && j <= len(src)
func extendMatch(src []byte, i, j int) int {
for ; j < len(src) && src[i] == src[j]; i, j = i+1, j+1 {
@@ -105,8 +108,9 @@ func hash(u, shift uint32) uint32 {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlock(dst, src []byte) (d int) {
// Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.
// The table element type is uint16, as s < sLimit and sLimit < len(src)