MCPcopy Index your code
hub / github.com/klauspost/compress / WithDecodeAllCapLimit

Function WithDecodeAllCapLimit

zstd/decoder_options.go:168–173  ·  view source on GitHub ↗

WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, or any size set in WithDecoderMaxMemory. This can be used to limit decoding to a specific maximum output size. Disabled by default. Can be changed with ResetWithOptions.

(b bool)

Source from the content-addressed store, hash-verified

166// Disabled by default.
167// Can be changed with ResetWithOptions.
168func WithDecodeAllCapLimit(b bool) DOption {
169 return func(o *decoderOptions) error {
170 o.limitToCap = b
171 return nil
172 }
173}
174
175// WithDecodeBuffersBelow will fully decode readers that have a
176// `Bytes() []byte` and `Len() int` interface similar to bytes.Buffer.

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…