mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			391 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			391 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved.
 | 
						|
 | 
						|
package compressions
 | 
						|
 | 
						|
import (
 | 
						|
	"io"
 | 
						|
 | 
						|
	teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
 | 
						|
)
 | 
						|
 | 
						|
var sharedZSTDReaderPool *ReaderPool
 | 
						|
 | 
						|
func init() {
 | 
						|
	if !teaconst.IsMain {
 | 
						|
		return
 | 
						|
	}
 | 
						|
 | 
						|
	sharedZSTDReaderPool = NewReaderPool(CalculatePoolSize(), func(reader io.Reader) (Reader, error) {
 | 
						|
		return newZSTDReader(reader)
 | 
						|
	})
 | 
						|
}
 |