Versions in this module Expand all Collapse all v1 v1.24.4 Aug 19, 2016 Changes in this version + const BufferSize + const LargeBufferSize + const SmallBufferSize + type Buffer struct + Value []byte + func CreateBuffer(container []byte, parent Pool) *Buffer + func NewBuffer() *Buffer + func NewBufferWithSize(size int) *Buffer + func NewLargeBuffer() *Buffer + func NewLocalBuffer(size int) *Buffer + func NewSmallBuffer() *Buffer + func (b *Buffer) Append(data []byte) *Buffer + func (b *Buffer) AppendBytes(bytes ...byte) *Buffer + func (b *Buffer) AppendString(s string) *Buffer + func (b *Buffer) AppendUint16(v uint16) *Buffer + func (b *Buffer) AppendUint32(v uint32) *Buffer + func (b *Buffer) Bytes() []byte + func (b *Buffer) Clear() *Buffer + func (b *Buffer) FillFrom(reader io.Reader) (int, error) + func (b *Buffer) IsEmpty() bool + func (b *Buffer) IsFull() bool + func (b *Buffer) Len() int + func (b *Buffer) Prepend(data []byte) *Buffer + func (b *Buffer) PrependBytes(data ...byte) *Buffer + func (b *Buffer) PrependHash(h hash.Hash) *Buffer + func (b *Buffer) PrependUint16(v uint16) *Buffer + func (b *Buffer) PrependUint32(v uint32) *Buffer + func (b *Buffer) Read(data []byte) (int, error) + func (b *Buffer) Release() + func (b *Buffer) Reset() *Buffer + func (b *Buffer) Slice(from, to int) *Buffer + func (b *Buffer) SliceBack(offset int) *Buffer + func (b *Buffer) SliceFrom(from int) *Buffer + func (b *Buffer) String() string + func (b *Buffer) Write(data []byte) (int, error) + type BufferPool struct + func NewBufferPool(bufferSize, poolSize int) *BufferPool + func (p *BufferPool) Allocate() *Buffer + func (p *BufferPool) Free(buffer *Buffer) + type Pool interface + Allocate func() *Buffer + Free func(*Buffer)