variableblk

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Overview

Package variableblk provides a file diff method based on the following algorithm: Scan the files and compare byte by byte. For a byte stream that is the same, it is skipped if it reaches certain length; the bytes are included in the pwrite even though they are the same, this is to avoid sending smaller pwrites. For bytes stream that is not the same, generates a pwrite as large as possible(pre-defined length).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
}

Factory is a helper for creating a new file differ factory

func (Factory) DiffContents

func (factory Factory) DiffContents(f1, f2 blobdiffer.FileInfo, target string, records chan<- record.Record,
	hf dlhash.Factory) error

DiffContents reads the files in a chunk, compares byte by byte, generates a pwrite for every unmatched variable sized blocks. Caller is expected to close the records channel.

Jump to

Keyboard shortcuts

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