slicer

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package slicer provides an io.Reader that returns subsets of a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader implements io.Reader reading the sliced regions provided to it from the underlying file thus extracting subsets of an underlying file without modifying or copying the file.

func NewReader

func NewReader(seeker io.ReadSeeker, slices []Slice) (*Reader, error)

func (*Reader) Read

func (r *Reader) Read(b []byte) (int, error)

type Slice

type Slice struct {
	Offset uint64
	Length uint64
}

func (Slice) Overlaps

func (s Slice) Overlaps(x Slice) bool

Jump to

Keyboard shortcuts

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