Files
EdgeNode/internal/compressions/reader_pool_zstd.go

21 lines
395 B
Go
Raw Normal View History

2022-06-27 22:40:36 +08:00
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package compressions
import (
2022-07-26 09:41:43 +08:00
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
2022-06-27 22:40:36 +08:00
"io"
)
var sharedZSTDReaderPool *ReaderPool
func init() {
if !teaconst.IsMain {
2022-07-26 09:41:43 +08:00
return
}
sharedZSTDReaderPool = NewReaderPool(CalculatePoolSize(), func(reader io.Reader) (Reader, error) {
2022-06-27 22:40:36 +08:00
return newZSTDReader(reader)
})
}