Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferPool = sync.Pool{ New: func() interface{} { return bytes.NewBuffer(make([]byte, 0, 256)) }, }
BufferPool is a sync.Pool for buffers used to write compressed data to.
View Source
var CompressPool = sync.Pool{ New: func() interface{} { w, _ := flate.NewWriter(ioutil.Discard, 6) return w }, }
CompressPool is a sync.Pool for writeCloseResetter flate readers. These are pooled for connections.
View Source
var DecompressPool = sync.Pool{ New: func() interface{} { return flate.NewReader(bytes.NewReader(nil)) }, }
DecompressPool is a sync.Pool for io.ReadCloser flate readers. These are pooled for connections.
Functions ¶
func PutAndGetStates ¶
func PutAndGetStates(b []interface{}) []interface{}
PutAndGetStates puts the block states passed into a map and returns it if the same blocks didn't already exist. If the blocks did already exist, the original blocks are returned so that the slice passed may be garbage collected.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.