WithDecoderLowmem will set whether to use a lower amount of memory, but possibly have to allocate more while running. Cannot be changed with ResetWithOptions.
(b bool)
| 45 | // but possibly have to allocate more while running. |
| 46 | // Cannot be changed with ResetWithOptions. |
| 47 | func WithDecoderLowmem(b bool) DOption { |
| 48 | return func(o *decoderOptions) error { |
| 49 | if o.resetOpt && b != o.lowMem { |
| 50 | return errors.New("WithDecoderLowmem cannot be changed on Reset") |
| 51 | } |
| 52 | o.lowMem = b |
| 53 | return nil |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | // WithDecoderConcurrency sets the number of created decoders. |
| 58 | // When decoding block with DecodeAll, this will limit the number |
no outgoing calls
searching dependent graphs…