buffer

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSize = (1 << 31) - 1
)

Variables

View Source
var (
	InvalidOffset = errors.New("invalid offset")
	InvalidWhence = errors.New("invalid whence")
)

Functions

This section is empty.

Types

type Buffer

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

func From

func From(data []byte) *Buffer

func New

func New() *Buffer

func (*Buffer) Data

func (buffer *Buffer) Data() []byte

func (*Buffer) Len

func (buffer *Buffer) Len() int

func (*Buffer) Read

func (buffer *Buffer) Read(data []byte) (int, error)

func (*Buffer) ReadByte

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

func (*Buffer) Seek

func (buffer *Buffer) Seek(offset int64, whence int) (int64, error)

func (*Buffer) Slice

func (buffer *Buffer) Slice(start, end int) *Buffer

func (*Buffer) Write

func (buffer *Buffer) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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