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

Function WithLowerEncoderMem

zstd/encoder_options.go:327–335  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

325// memory usage. See WithWindowSize.
326// Cannot be changed with ResetWithOptions.
327func 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)

Callers 9

addLevelPoolFunction · 0.92
FuzzEncodingFunction · 0.85
EncodeToFunction · 0.85
getConcBlockOptsFunction · 0.85
getEncOptsFunction · 0.85
TestWriterMemUsageFunction · 0.85
newZstdWriterFunction · 0.85

Calls

no outgoing calls

Tested by 7

FuzzEncodingFunction · 0.68
getConcBlockOptsFunction · 0.68
getEncOptsFunction · 0.68
TestWriterMemUsageFunction · 0.68
newZstdWriterFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…