Documentation ¶
Index ¶
- Constants
- Variables
- func Source(reader io.ReadSeeker, size int64, cmdReader io.Reader, cmdWriter io.Writer, ...) (err error)
- func Target(writer spgz.SparseFile, size int64, cmdReader io.Reader, cmdWriter io.Writer, ...) (err error)
- type CountingReader
- type CountingWriteCloser
- type FixingSpgzFileWrapper
- type ProgressListener
- type TargetFile
Constants ¶
View Source
const (
DefTargetBlockSize = 128 * 1024
)
Variables ¶
View Source
var (
ErrInvalidFormat = errors.New("invalid data format")
)
Functions ¶
Types ¶
type CountingReader ¶
type CountingWriteCloser ¶
type CountingWriteCloser struct { io.WriteCloser // contains filtered or unexported fields }
type FixingSpgzFileWrapper ¶ added in v1.2.0
FixingSpgzFileWrapper conceals read errors caused by compressed data corruption by re-writing the corrupt blocks with zeros. Such errors are usually caused by abrupt termination of the writing process. This wrapper is used as the sync target so the corrupt blocks will be updated during the sync process.
type ProgressListener ¶ added in v1.3.0
type TargetFile ¶ added in v1.2.0
type TargetFile interface { io.ReadWriteSeeker io.WriterAt io.Closer spgz.Truncatable }
Click to show internal directories.
Click to hide internal directories.