reader

package
v0.0.0-...-8ff3cc7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Initializable

type Initializable interface {
	IsInitialized() bool
	Initialize() error
}

Initializable is an interface containing methods to initialize a ReadSeeker.

type ReadSeeker

type ReadSeeker interface {
	io.Reader
	io.Closer
	Initializable
	SeekOffset(offset int64) error
}

ReadSeeker is an interface used to capture a file reader with seek functionality.

func NewCompressedFileSeeker

func NewCompressedFileSeeker(path string, buffsize int) (ReadSeeker, error)

NewCompressedFileSeeker creates a ReadSeeker based on a file path.

func NewCompressedSeeker

func NewCompressedSeeker(fs ReadSeeker) (ReadSeeker, error)

NewCompressedSeeker wraps a ReadSeeker to compress its data on the fly.

func NewFileReadSeeker

func NewFileReadSeeker(path string, buffsize int) ReadSeeker

NewFileReadSeeker wraps a buffered file reader with Seeking functionality. Notice that Seek calls un-set the reader and require Initialize calls. This is to avoid potentially unnecessary disk IO.

Jump to

Keyboard shortcuts

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