rollinghash

package
v0.0.0-...-7afb0bc Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RDiff

type RDiff interface {
	ComputeHashes(file *os.File) ([]chunk, error)
	ComputeDelta(original, updated *os.File) ([]byte, error)
}

type RollingHash

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

func NewRollingHash

func NewRollingHash(chunkSize int) *RollingHash

NewRollingHash returns a new RollingHash struct

func (*RollingHash) ComputeDelta

func (r *RollingHash) ComputeDelta(original, updated *os.File) ([]byte, error)

ComputeDelta generates a description of the differences between the original and updated versions of a file

func (*RollingHash) ComputeHashes

func (r *RollingHash) ComputeHashes(file *os.File) ([]chunk, error)

ComputeHashes reads a file in chunks and computes the hash of each chunk using the SHA1 hash function

Jump to

Keyboard shortcuts

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