mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-21 22:33:27 +00:00
Update dependencies
* Updates netlink/netns * Updates x/sys, arkade and apimachinery Build passes, minor updates. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
15
vendor/github.com/klauspost/compress/zstd/encoder_options.go
generated
vendored
15
vendor/github.com/klauspost/compress/zstd/encoder_options.go
generated
vendored
@ -24,6 +24,7 @@ type encoderOptions struct {
|
||||
allLitEntropy bool
|
||||
customWindow bool
|
||||
customALEntropy bool
|
||||
customBlockSize bool
|
||||
lowMem bool
|
||||
dict *dict
|
||||
}
|
||||
@ -33,7 +34,7 @@ func (o *encoderOptions) setDefault() {
|
||||
concurrent: runtime.GOMAXPROCS(0),
|
||||
crc: true,
|
||||
single: nil,
|
||||
blockSize: 1 << 16,
|
||||
blockSize: maxCompressedBlockSize,
|
||||
windowSize: 8 << 20,
|
||||
level: SpeedDefault,
|
||||
allLitEntropy: true,
|
||||
@ -73,8 +74,9 @@ func WithEncoderCRC(b bool) EOption {
|
||||
}
|
||||
|
||||
// WithEncoderConcurrency will set the concurrency,
|
||||
// meaning the maximum number of decoders to run concurrently.
|
||||
// meaning the maximum number of encoders to run concurrently.
|
||||
// The value supplied must be at least 1.
|
||||
// For streams, setting a value of 1 will disable async compression.
|
||||
// By default this will be set to GOMAXPROCS.
|
||||
func WithEncoderConcurrency(n int) EOption {
|
||||
return func(o *encoderOptions) error {
|
||||
@ -106,6 +108,7 @@ func WithWindowSize(n int) EOption {
|
||||
o.customWindow = true
|
||||
if o.blockSize > o.windowSize {
|
||||
o.blockSize = o.windowSize
|
||||
o.customBlockSize = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -188,10 +191,9 @@ func EncoderLevelFromZstd(level int) EncoderLevel {
|
||||
return SpeedDefault
|
||||
case level >= 6 && level < 10:
|
||||
return SpeedBetterCompression
|
||||
case level >= 10:
|
||||
return SpeedBetterCompression
|
||||
default:
|
||||
return SpeedBestCompression
|
||||
}
|
||||
return SpeedDefault
|
||||
}
|
||||
|
||||
// String provides a string representation of the compression level.
|
||||
@ -222,6 +224,9 @@ func WithEncoderLevel(l EncoderLevel) EOption {
|
||||
switch o.level {
|
||||
case SpeedFastest:
|
||||
o.windowSize = 4 << 20
|
||||
if !o.customBlockSize {
|
||||
o.blockSize = 1 << 16
|
||||
}
|
||||
case SpeedDefault:
|
||||
o.windowSize = 8 << 20
|
||||
case SpeedBetterCompression:
|
||||
|
Reference in New Issue
Block a user