func Init(cfg PoolConfig) {
	config = cfg
	initBuffers()
}
Init sets up a non-default pooling and allocation strategy. Should be run before serialization is done.
package buffer
import (
	"io"
	"sync"
)
type PoolConfig struct {
	StartSize  int  
	PooledSize int  
	MaxSize    int  
}
var config = PoolConfig{
	StartSize:  128,
	PooledSize: 512,
	MaxSize:    32768,
}
var buffers = map[int]*sync.Pool{}
func initBuffers() {
	for l := config.PooledSize; l <= config.MaxSize; l *= 2 {
		buffers[l] = new(sync.Pool)
	}
}
func init() {
	initBuffers()
}