seekbuf

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: GPL-3.0 Imports: 1 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 an io.ReadCloser that supports seeking.

func New

func New(data []byte) *Buffer

func (*Buffer) Close

func (b *Buffer) Close() error

Close clears all the data out of the buffer and sets the read position to 0.

func (*Buffer) Read

func (b *Buffer) Read(p []byte) (int, error)

func (*Buffer) Seek

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

Seek sets the read pointer to offset.

Jump to

Keyboard shortcuts

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