mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-02 22:10:25 +08:00
21 lines
401 B
Go
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)
|
|
})
|
|
}
|