bytes2

package
v0.0.0-...-440800f Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 0 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 implements a subset of the write portion of bytes.Buffer, but more efficiently. This is meant to be used in very high QPS operations, especially for WriteByte, and without abstracting it as a Writer. Function signatures contain errors for compatibility, but they do not return errors.

func NewBuffer

func NewBuffer(b []byte) *Buffer

NewBuffer is equivalent to bytes.NewBuffer.

func (*Buffer) Bytes

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

Bytes is equivalent to bytes.Buffer.Bytes.

func (*Buffer) Len

func (buf *Buffer) Len() int

Len is equivalent to bytes.Buffer.Len.

func (*Buffer) String

func (buf *Buffer) String() string

Strings is equivalent to bytes.Buffer.Strings.

func (*Buffer) Write

func (buf *Buffer) Write(b []byte) (int, error)

Write is equivalent to bytes.Buffer.Write.

func (*Buffer) WriteByte

func (buf *Buffer) WriteByte(b byte) error

WriteByte is equivalent to bytes.Buffer.WriteByte.

func (*Buffer) WriteString

func (buf *Buffer) WriteString(s string) (int, error)

WriteString is equivalent to bytes.Buffer.WriteString.

Jump to

Keyboard shortcuts

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