This repository has been archived on 2026-07-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
GoEdgeNode/internal/compressions/writer_pool_zstd.go
T
2024-07-27 15:42:50 +08:00

22 lines
402 B
Go

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