WithConcurrentBlocks enables job-based parallel compression for streams. When enabled and concurrent > 1, input is split into large sections (jobs) that are compressed simultaneously by multiple goroutines. Each non-first job receives an overlap prefix from the previous job for match context. Output
(b bool)
| 343 | // Currently disabled when used with dictionary encoding. |
| 344 | // Cannot be changed with ResetWithOptions. |
| 345 | func WithConcurrentBlocks(b bool) EOption { |
| 346 | return func(o *encoderOptions) error { |
| 347 | if o.resetOpt && b != o.concurrentBlocks { |
| 348 | return errors.New("WithConcurrentBlocks cannot be changed on Reset") |
| 349 | } |
| 350 | o.concurrentBlocks = b |
| 351 | return nil |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | // jobSize returns the input section size per parallel job. |
| 356 | func (o *encoderOptions) jobSize() int { |
no outgoing calls
searching dependent graphs…