Patent ID: 7861224

Claim:
A method of encoding a new version of a data module relative to an initial version of the data module, the method comprising: reading the initial version of the data module into a first portion of a buffer; reading the new version of the data module into a second portion of the buffer that is concatenated onto the first portion of the buffer; initializing a target pointer to point to a beginning of the second portion of the buffer that comprises the new version of the data module; initializing a source pointer to point to a beginning of the first portion of the buffer that comprises the initial version of the data module; determining, after the initializing the target pointer and the initializing the source pointer, that second data pointed to by the target pointer matches a pattern of first data that is located in the buffer prior to a location pointed to by the second pointer; determining a first size of data required to encode a first distance from the source pointer to the matching pattern of the first data; determining a second size of data required to encode a second distance from the target pointer to the matching pattern of the first data; encoding, in response to the determining the first size and the determining the second size, the matching pattern of the first data along with a shorter of the first distance and the second distance; incrementing the source pointer and the target pointer by a size of the matching pattern of the first data; constructing, in response to the encoding, a delta data module that comprises the encoded matching pattern of the first data along with the shorter of the first distance and the second distance; and wherein the method is performed by a computer.