Skip to content

Commit

Permalink
ok no init
Browse files Browse the repository at this point in the history
  • Loading branch information
bblanton-asapp committed Jan 7, 2021
1 parent 8b25f9c commit a089770
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions zstd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ import (
"github.com/klauspost/compress/zstd"
)

var zstdDec *zstd.Decoder
var zstdEnc *zstd.Encoder
var zstdDec, _ = zstd.NewReader(nil)
var zstdEnc, _ = zstd.NewWriter(nil, zstd.WithZeroFrames(true))

func init(){
zstdDec, _ = zstd.NewReader(nil)
zstdEnc, _ = zstd.NewWriter(nil, zstd.WithZeroFrames(true))
}

func zstdDecompress(dst, src []byte) ([]byte, error) {
return zstdDec.DecodeAll(src, dst)
Expand Down

0 comments on commit a089770

Please sign in to comment.