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)
| 166 | // Disabled by default. |
| 167 | // Can be changed with ResetWithOptions. |
| 168 | func 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. |
no outgoing calls
searching dependent graphs…