buf

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: BSD-3-Clause Imports: 2 Imported by: 1

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].

Types

type Bytes

type Bytes struct {
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(in []byte) *Bytes

func Get

func Get(n, c int) *Bytes

func GetCap

func GetCap(c int) *Bytes

func GetLen

func GetLen(n int) *Bytes

func (*Bytes) AppendByte

func (bb *Bytes) AppendByte(b byte)

func (*Bytes) AppendFrom

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

func (*Bytes) AppendString

func (bb *Bytes) AppendString(s string)

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) Release

func (bb *Bytes) Release()

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