buffer

package
v0.0.0-...-898dac5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

buffer is similar to bytes.Buffer but specialized for this package

func New

func New(b []byte) *Buffer

func (*Buffer) Append

func (b *Buffer) Append(p []byte)

func (*Buffer) AppendByte

func (b *Buffer) AppendByte(bb byte)

func (*Buffer) AppendString

func (b *Buffer) AppendString(s string)

func (*Buffer) AppendUint16

func (b *Buffer) AppendUint16(n uint16)

func (*Buffer) AppendUint32

func (b *Buffer) AppendUint32(n uint32)

func (*Buffer) AppendUint64

func (b *Buffer) AppendUint64(n uint64)

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

func (*Buffer) Detach

func (b *Buffer) Detach() []byte

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) Next

func (b *Buffer) Next(n int64) ([]byte, bool)

func (*Buffer) PeekByte

func (b *Buffer) PeekByte() (byte, error)

func (*Buffer) ReadByte

func (b *Buffer) ReadByte() (byte, error)

func (*Buffer) ReadFromOnce

func (b *Buffer) ReadFromOnce(r io.Reader) error

func (*Buffer) ReadUint16

func (b *Buffer) ReadUint16() (uint16, error)

func (*Buffer) ReadUint32

func (b *Buffer) ReadUint32() (uint32, error)

func (*Buffer) ReadUint64

func (b *Buffer) ReadUint64() (uint64, error)

func (*Buffer) Reclaim

func (b *Buffer) Reclaim()

reclaim shifts used buffer space to the beginning of the underlying slice.

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) Size

func (b *Buffer) Size() int

func (*Buffer) Skip

func (b *Buffer) Skip(n int)

Jump to

Keyboard shortcuts

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