()
| 28 | } |
| 29 | |
| 30 | func (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. |
no outgoing calls
no test coverage detected