buf

package
v0.16.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

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 NewBytes

func NewBytes(n, c int) *Bytes

func (*Bytes) AppendFrom

func (bb *Bytes) AppendFrom(data []byte)

func (*Bytes) AppendTo

func (bb *Bytes) AppendTo(data []byte) []byte

func (*Bytes) Bytes

func (bb *Bytes) Bytes() *[]byte

func (Bytes) Cap

func (bb Bytes) Cap() int

func (*Bytes) CopyFrom

func (bb *Bytes) CopyFrom(data []byte)

func (*Bytes) CopyFromWithOffset

func (bb *Bytes) CopyFromWithOffset(data []byte, offset int)

func (*Bytes) CopyTo

func (bb *Bytes) CopyTo(data []byte) []byte

func (*Bytes) Fill

func (bb *Bytes) Fill(data []byte, start, end int)

func (*Bytes) Len

func (bb *Bytes) Len() int

func (*Bytes) Read

func (bb *Bytes) Read(p []byte) (n int, err error)

func (*Bytes) Reset

func (bb *Bytes) Reset()

func (*Bytes) SetBytes

func (bb *Bytes) SetBytes(b *[]byte)

func (*Bytes) Write

func (bb *Bytes) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL