Files
EdgeNode/internal/compressions/writer_pool_zstd.go
2024-05-17 18:30:33 +08:00

21 lines
401 B
Go

// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved.
package compressions
import (
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"io"
)
var sharedZSTDWriterPool *WriterPool
func init() {
if !teaconst.IsMain {
return
}
sharedZSTDWriterPool = NewWriterPool(CalculatePoolSize(), func(writer io.Writer, level int) (Writer, error) {
return newZSTDWriter(writer)
})
}