WithLowerEncoderMem will trade in some memory cases trade less memory usage for slower encoding speed. This will not change the window size which is the primary function for reducing memory usage. See WithWindowSize. Cannot be changed with ResetWithOptions.
(b bool)
| 325 | // memory usage. See WithWindowSize. |
| 326 | // Cannot be changed with ResetWithOptions. |
| 327 | func WithLowerEncoderMem(b bool) EOption { |
| 328 | return func(o *encoderOptions) error { |
| 329 | if o.resetOpt && b != o.lowMem { |
| 330 | return errors.New("WithLowerEncoderMem cannot be changed on Reset") |
| 331 | } |
| 332 | o.lowMem = b |
| 333 | return nil |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | // WithConcurrentBlocks enables job-based parallel compression for streams. |
| 338 | // When enabled and concurrent > 1, input is split into large sections (jobs) |
no outgoing calls
searching dependent graphs…