summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/s2/reader.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-07-31 09:47:25 +0100
committerLibravatar GitHub <noreply@github.com>2023-07-31 09:47:25 +0100
commit9ed9d96597f7f2ecd4e51e5ea1449dd6c08eeeeb (patch)
treef4acb280b255e490ba8be77e73c9795d68c11754 /vendor/github.com/klauspost/compress/s2/reader.go
parent[feature] Implement markers API (#1989) (diff)
downloadgotosocial-9ed9d96597f7f2ecd4e51e5ea1449dd6c08eeeeb.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.60 to 7.0.61 (#2041)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/s2/reader.go')
-rw-r--r--vendor/github.com/klauspost/compress/s2/reader.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/s2/reader.go b/vendor/github.com/klauspost/compress/s2/reader.go
index 8b84baa6d..2f01a3987 100644
--- a/vendor/github.com/klauspost/compress/s2/reader.go
+++ b/vendor/github.com/klauspost/compress/s2/reader.go
@@ -147,6 +147,13 @@ type Reader struct {
ignoreCRC bool
}
+// GetBufferCapacity returns the capacity of the internal buffer.
+// This might be useful to know when reusing the same reader in combination
+// with the lazy buffer option.
+func (r *Reader) GetBufferCapacity() int {
+ return cap(r.buf)
+}
+
// ensureBufferSize will ensure that the buffer can take at least n bytes.
// If false is returned the buffer exceeds maximum allowed size.
func (r *Reader) ensureBufferSize(n int) bool {