Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DifferChoice ¶
type DifferChoice struct { delta.Differ compression.Compressor }
DifferChoice aggregates the two algorithms that are used to create a delta patch. // The compressor can be a null compressor which does no compression at all. For the patching side refer to PatcherChoice.
func ChooseAlgorithms ¶
func ChooseAlgorithms(acceptedAlgorithms []string, mfFrom, mfTo *ociutils.Manifest) DifferChoice
ChooseAlgorithms returns a DifferChoice that is the most suitable to create a delta patch for the given artifacts, under the constraint of only using the acceptedAlgorithms.
func (*DifferChoice) GetFileExt ¶
func (c *DifferChoice) GetFileExt() string
GetFileExt returns the file extension that is appended to the file name of a delta patch. For instance, a zstd-compressed bsdiff patch has the value `.bsdiff.zstd`.
func (*DifferChoice) GetMediaType ¶
func (c *DifferChoice) GetMediaType() string
GetMediaType returns the media type that is used to identify the algorithms of a delta patch. For instance, a zstd-compressed bsdiff patch has the value `application/bsdiff+zstd`.
func (*DifferChoice) GetTagSuffix ¶
func (c *DifferChoice) GetTagSuffix() string
GetTagSuffix returns the suffix that is added to the tag of the delta image to identify the used algorithms.
type PatcherChoice ¶
type PatcherChoice struct { delta.Patcher compression.Decompressor }
PatcherChoice aggregates the two algorithms that are used to apply a delta patch. The decompressor can be a null compressor which does no decompression at all. For the diffing side refer to DifferChoice.