Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultRediffSizeLimit = 4 * 1024 * 1024 * 1024 // 4GB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { GetTargetContainer() *tlc.Container GetSourceContainer() *tlc.Container GetDiffMappings() DiffMappings Partitions() int Optimize(params OptimizeParams) error }
func NewContext ¶
NewContext initializes the diffing process, it also analyzes the patch to find diff mapping so that it's ready for optimization
type DiffMapping ¶
A DiffMapping is a pair of files that have similar contents (blocks in common) or equal paths, and which are good candidates for bsdiffing
type DiffMappings ¶
type DiffMappings map[int64]*DiffMapping
DiffMappings contains one diff mapping for each pair of files to be bsdiff'd
type FileOrigin ¶
FileOrigin maps a target's file index to how many bytes it contribute to a given source file
type OptimizeParams ¶
type Params ¶
type Params struct { // PatchReader is a source used twice: to find diff mappings, and then again // to copy rsync operations for files that we won't optimize. // rediff.Context is in charge of resuming, since it uses it twice. PatchReader savior.SeekSource // RediffSizeLimit (optional) is the maximum size of a file we'll attempt to rediff. // If a file is larger than that, ops will just be copied. RediffSizeLimit int64 // optional SuffixSortConcurrency int // optional Partitions int // optional Compression *pwr.CompressionSettings // optional Consumer *state.Consumer // optional BsdiffStats *bsdiff.DiffStats // optional ForceMapAll bool // optional MeasureMem bool }
Click to show internal directories.
Click to hide internal directories.