Basics: Byte-level Differencing

Byte-level differencing installs a software package using the byte-level differencing technology. The byte-level differencing function compares a software package to be installed (version package) with the base version (base package) that already exists on the target. On the source host a delta package is created for all the differences found between the version package and the base package, where both the base package and the version package reside on the source host. Because only the delta package, which is typically much smaller than either the version or base packages, is sent on the network, network traffic is considerably reduced. The new version of the software package is reconstructed on the target by applying the changes contained in the delta package to the base package.


· How Byte-level Differencing Works

Byte-level differencing compactly encodes a version of a file as a set of changes from a previous version. The delta file consists of any new files not in the base version and the differences between existing files in two versions. A differencing algorithm finds and outputs the changes made between two versions of the same file by locating common strings to be copied and unique strings to be added.


The process can be represented as follows:


Version File - Base File = Delta File


Reconstruction, the inverse operation, requires the base file and a delta file to rebuild a version:


Base File + Delta File = Version File


· How Software Distribution Uses Byte-level Differencing

Any distributed application that updates data frequently should take advantage of byte-level differencing to reduce the network traffic. Software Distribution can use byte-level differencing to distribute upgrades of software applications to a wide range of endpoints. To upgrade an already existing software package (base package) to a new version (version package), Software Distribution applies the differencing algorithm to each file contained in the version package that is delta compressible and that is found in the base package with the same fully qualified path.


To apply the delta installation, the base and the version packages must have the same nested structure. The above operation is performed on the source host and generates a delta package that is sent to the target.


On the target, Software Distribution uses files contained in the delta package to reconstruct each version file starting from the base file already installed on the target and applying to it the corresponding delta file contained in the delta package. If any of the installed files to be reconstructed are not found on the target, modified, or locked, the delta installation fails. Read-only files, if any, are overwritten.


The operations of loading and installing from a depository can also take advantage of the byte-level differencing technology because only the delta package is loaded on the depository for a subsequent byte-level differencing installation. The delta package can be also unloaded from a depository.


Byte-level differencing is the most efficient if the new version of a software package that you want to install contains few differences compared with the base version. If the difference is very significant, it can be more efficient to reinstall the new version.


Converted from CHM to HTML with chm2web Standard 2.75 (unicode)