Skip to content

Commit 1ca9138

Browse files
committed
Remove unnecessary options
1 parent 2543958 commit 1ca9138

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

zstd/zstd.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ var encoderOptions = []zstd.EOption{
3131
// The default zstd window size is 8MB, which is much larger than the
3232
// typical RPC message and wastes a bunch of memory.
3333
zstd.WithWindowSize(512 * 1024),
34-
// By default zstd uses GOMAXPROCS (64 in prod) threads to encode a
35-
// given input, which is overkill for a typical RPC message and
36-
// further wastes memory.
37-
zstd.WithEncoderConcurrency(1),
38-
}
39-
40-
var decoderOptions = []zstd.DOption{
41-
// Similar, zstd uses GOMAXPROCS threads for decoding, which is
42-
// overkill.
43-
zstd.WithDecoderConcurrency(1),
4434
}
4535

4636
type compressor struct {
@@ -50,7 +40,7 @@ type compressor struct {
5040

5141
func init() {
5242
enc, _ := zstd.NewWriter(nil, encoderOptions...)
53-
dec, _ := zstd.NewReader(nil, decoderOptions...)
43+
dec, _ := zstd.NewReader(nil)
5444
c := &compressor{
5545
encoder: enc,
5646
decoder: dec,

0 commit comments

Comments
 (0)