1.4.5.2
This commit is contained in:
20
EdgeNode/internal/compressions/writer_pool_brotli.go
Normal file
20
EdgeNode/internal/compressions/writer_pool_brotli.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package compressions
|
||||
|
||||
import (
|
||||
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
|
||||
"io"
|
||||
)
|
||||
|
||||
var sharedBrotliWriterPool *WriterPool
|
||||
|
||||
func init() {
|
||||
if !teaconst.IsMain {
|
||||
return
|
||||
}
|
||||
|
||||
sharedBrotliWriterPool = NewWriterPool(CalculatePoolSize(), func(writer io.Writer, level int) (Writer, error) {
|
||||
return newBrotliWriter(writer)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user