Documentation
¶
Overview ¶
Package bytepool defines pool for storing and reusing raw bytes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteBufferPool ¶
ByteBufferPool is a cached pool of reusable byte buffers.
func NewBufferPool ¶
func NewBufferPool() *ByteBufferPool
NewBufferPool allocates a new ByteBufferPool.
func (*ByteBufferPool) Get ¶
func (bbp *ByteBufferPool) Get() *bytes.Buffer
Get returns a bytes.Buffer from the pool.
func (*ByteBufferPool) Put ¶
func (bbp *ByteBufferPool) Put(b *bytes.Buffer)
Put returns bytes.Buffer to the pool.
type BytePool ¶
BytePool is a cached pool of reusable byte slices.
func NewBytePool ¶
NewBytePool allocates a new BytePool with slices of equal length and capacity.
Click to show internal directories.
Click to hide internal directories.