Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFromReader(dst io.Writer, src t.HoleReaderAt, blockSize int, opts *BuildOptions) error
- type BuildOptions
- type Builder
- type EntryType
- type Reader
- func (r *Reader) Close() error
- func (r *Reader) DataSize() int64
- func (r *Reader) LiveSize() int64
- func (r *Reader) LogLoadStats(logFn func(msg string, args ...any))
- func (r *Reader) NextData(off int64) (int64, error)
- func (r *Reader) NextHole(off int64) (int64, error)
- func (r *Reader) ReadAt(p []byte, off int64) (int, error)
- func (r *Reader) Size() int64
Constants ¶
View Source
const ( EntryType_Data EntryType = 0 EntryType_Hole EntryType = 1 MaxBlocks = (1 << 48) Magic = "sparseblock\x31\x41\x59\x26\x53" )
Variables ¶
View Source
var ( ErrEntryTooBig = errors.New("sparseblock/Builder: Entry too big") ErrShortRead = errors.New("sparseblock/Builder: short read") )
View Source
var ( ErrInvalidMagic = errors.New("sparseblock/Reader: invalid magic") ErrInvalidIndex = errors.New("sparseblock/Reader: invalid index encoding") )
Functions ¶
func BuildFromReader ¶
func BuildFromReader(dst io.Writer, src t.HoleReaderAt, blockSize int, opts *BuildOptions) error
Types ¶
type BuildOptions ¶
type BuildOptions struct {
MaxDataSize int64
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) LogLoadStats ¶
Click to show internal directories.
Click to hide internal directories.