MCPcopy
hub / github.com/klauspost/compress / setDefault

Method setDefault

zstd/decoder_options.go:30–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (o *decoderOptions) setDefault() {
31 *o = decoderOptions{
32 // use less ram: true for now, but may change.
33 lowMem: true,
34 concurrent: runtime.GOMAXPROCS(0),
35 maxWindowSize: MaxWindowSize,
36 decodeBufsBelow: 128 << 10,
37 }
38 if o.concurrent > 4 {
39 o.concurrent = 4
40 }
41 o.maxDecodedSize = 64 << 30
42}
43
44// WithDecoderLowmem will set whether to use a lower amount of memory,
45// but possibly have to allocate more while running.

Callers 3

NewReaderFunction · 0.45
NewWriterFunction · 0.45
initializeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected