MCPcopy
hub / github.com/klauspost/compress / WithDecodeBuffersBelow

Function WithDecodeBuffersBelow

zstd/decoder_options.go:181–189  ·  view source on GitHub ↗

WithDecodeBuffersBelow will fully decode readers that have a `Bytes() []byte` and `Len() int` interface similar to bytes.Buffer. This typically uses less allocations but will have the full decompressed object in memory. Note that DecodeAllCapLimit will disable this, as well as giving a size of 0 or

(size int)

Source from the content-addressed store, hash-verified

179// Default is 128KiB.
180// Cannot be changed with ResetWithOptions.
181func WithDecodeBuffersBelow(size int) DOption {
182 return func(o *decoderOptions) error {
183 if o.resetOpt && size != o.decodeBufsBelow {
184 return errors.New("WithDecodeBuffersBelow cannot be changed on Reset")
185 }
186 o.decodeBufsBelow = size
187 return nil
188 }
189}
190
191// IgnoreChecksum allows to forcibly ignore checksum checking.
192// Can be changed with ResetWithOptions.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…