lba

package
v0.0.0-...-088a001 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package lba provides a library for working with Logical Block Addresses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalBlockAddresser

type LogicalBlockAddresser struct {
	PhysicalBlockSize int
	LogicalBlockSize  int
}

LogicalBlockAddresser represents Logical Block Addressing.

func (*LogicalBlockAddresser) Copy

func (lba *LogicalBlockAddresser) Copy(dst []byte, src []byte, rng Range) (int, error)

Copy copies from src to dst in the specified range.

func (*LogicalBlockAddresser) From

func (lba *LogicalBlockAddresser) From(src []byte, rng Range) ([]byte, error)

From returns a slice from a source slice in the the specified range inclusively.

func (*LogicalBlockAddresser) Make

func (lba *LogicalBlockAddresser) Make(size int) []byte

Make returns a slice from a source slice in the the specified range inclusively.

type Range

type Range struct {
	Start uint64
	End   uint64
}

Range represents a range of Logical Block Addresses.

Jump to

Keyboard shortcuts

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