delta

package
v0.0.0-...-4ee0c84 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDelta

func GenerateDelta(sigFile, updatedFile string, deltaFile string) error

GenerateDelta

func GenerateDeltaReport

func GenerateDeltaReport(delta *Delta)

Types

type Delta

type Delta struct {
	Inserted []SingleDelta `json:"inserted,omitempty"`
	Deleted  []SingleDelta `json:"deleted,omitempty"`
	Copied   []SingleDelta `json:"copied,omitempty"`
}

func NewDelta

func NewDelta() *Delta

func UnmarshalJSON

func UnmarshalJSON(bytes []byte) (*Delta, error)

func (*Delta) MarshalJSON

func (d *Delta) MarshalJSON() ([]byte, error)

type DeltaProcess

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

func NewDeltaProcess

func NewDeltaProcess(log logger.Logger, sig *signature.Signature, reader *bufio.Reader) *DeltaProcess

func (*DeltaProcess) AppendDiff

func (dp *DeltaProcess) AppendDiff(md5Hash [16]byte) bool

func (*DeltaProcess) BuildDelta

func (dp *DeltaProcess) BuildDelta() *Delta

func (*DeltaProcess) Next

func (dp *DeltaProcess) Next() error

func (*DeltaProcess) Roll

func (dp *DeltaProcess) Roll(checksums map[int64][16]byte) error

func (*DeltaProcess) SetRemainingBytes

func (dp *DeltaProcess) SetRemainingBytes()

type Report

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

type SingleDelta

type SingleDelta struct {
	RChecksum   int64    `json:"rchecksum,omitempty"`
	MD5Checksum [16]byte `json:"-"`
	Start       int64    `json:"start,omitempty"`
	End         int64    `json:"end,omitempty"`
	DiffBytes   []byte   `json:"diff,omitempty"`
}

Jump to

Keyboard shortcuts

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