fsplit

package module
v0.0.0-...-343e942 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 9 Imported by: 0

README

fsplit

Thin wrapper around restic/chunker.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHasher

func DefaultHasher() hasher.Hasher

Types

type Chunk

type Chunk struct {
	Position uint64
	Size     uint64
	Data     []byte
}

type Manifest

type Manifest struct {
	Path       string
	Size       int64
	Hash       string
	Chunks     []string
	Polynomial chunker.Pol
}

type Splitter

type Splitter interface {
	ReadManifest(path string) (*Manifest, error)
	Assemble(mf *Manifest, dst io.Writer) error
	Split(source io.Reader, dstDir string) (string, error)
	StreamChunks(source io.Reader, chunks chan *Chunk, done chan string) error
	SplitParallel(source io.Reader, dstDir string) (string, error)
	ChunkerPolynomial() chunker.Pol
	SetHasher(h hasher.Hasher)
}

func DefaultSplitter

func DefaultSplitter() Splitter

Directories

Path Synopsis
cmd
fsplit command

Jump to

Keyboard shortcuts

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