Documentation ¶
Index ¶
- func NewBytesPool(min, max int) *bytesPool
- type Bytes
- func (bb *Bytes) AppendFrom(data []byte)
- func (bb *Bytes) AppendTo(data []byte) []byte
- func (bb *Bytes) Bytes() *[]byte
- func (bb Bytes) Cap() int
- func (bb *Bytes) CopyFrom(data []byte)
- func (bb *Bytes) CopyFromWithOffset(data []byte, offset int)
- func (bb *Bytes) CopyTo(data []byte) []byte
- func (bb *Bytes) Fill(data []byte, start, end int)
- func (bb *Bytes) Len() int
- func (bb *Bytes) Read(p []byte) (n int, err error)
- func (bb *Bytes) Reset()
- func (bb *Bytes) SetBytes(b *[]byte)
- func (bb *Bytes) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBytesPool ¶
func NewBytesPool(min, max int) *bytesPool
NewBytesPool creates new bytesPool that reuses objects which size is in logarithmic range [min, max].
Note that it is a shortcut for Custom() constructor with Options provided by WithLogSizeMapping() and WithLogSizeRange(min, max) calls.
Types ¶
type Bytes ¶
type Bytes struct {
// contains filtered or unexported fields
}
func (*Bytes) AppendFrom ¶
func (*Bytes) CopyFromWithOffset ¶
Click to show internal directories.
Click to hide internal directories.