Automatic file differencing and updating system
First Claim
1. A method for generating a difference file comprising:
- a) reading new file data strings from a new file;
b) searching an old file for the presence of old file data strings matching said new file data strings;
c) when a match is found, storing in said difference file an indication of the position in said old file of said matching strings, along with an indication of a copy operation;
d) when no match is found, storing said new file data string in a location where it will available to said difference file and storing in said difference file an indication of the location of said insert data along with an indication of an insert operation;
e) repeating steps a) through d) until all data in said new file has been read and corresponding insert and copy operations have been written into said difference file.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and file structure for generating an efficient difference files from and old file and a new file so that a difference file can be transmitted to a second computer system where the difference file and a duplicate of the old file can quickly be used to create a copy of the new file is disclosed. A differencing process compares an old file and a new file to generate a difference file in which the old file is used as a database of byte strings. The differencing process reads strings of data from the new file, searches for the existence of those strings in the old file, and notes the locations in the old file in which strings in the new file are found and stores in a difference file an indication of the location where a matching string is found and an indication of the length. A specific file structure for the difference file is disclosed.
-
Citations
28 Claims
-
1. A method for generating a difference file comprising:
-
a) reading new file data strings from a new file; b) searching an old file for the presence of old file data strings matching said new file data strings; c) when a match is found, storing in said difference file an indication of the position in said old file of said matching strings, along with an indication of a copy operation; d) when no match is found, storing said new file data string in a location where it will available to said difference file and storing in said difference file an indication of the location of said insert data along with an indication of an insert operation; e) repeating steps a) through d) until all data in said new file has been read and corresponding insert and copy operations have been written into said difference file. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer program product comprising:
-
computer code that; a) reads data strings from a new file; b) searches an old file for the presence of old file data strings matching said new file data strings; c) when a match is found, stores in a difference file an indication of the position in said old file of said matching strings, along with an indication of a copy operation; d) when no match is found, stores said new file data string in an insert database and stores an indication of the position of said insert data in said insert database along with an indication of an insert operation; e) repeats steps a) through d) until all the data in said new file has been examined and corresponding insert and copy operations have been written into said difference file; and a computer-readable storage medium that stores said computer code.
-
-
15. A method for producing a reconstituted file from an existing file and a difference file comprising:
-
a) reading from said difference file commands indicating data strings to be copied from said existing file into a reconstituted file and data strings to be inserted from an insert database in said difference file into said reconstituted file; b) copying said data strings indicated from said existing file into said reconstituted file; and c) inserting data strings indicated from said insert database into said reconstituted file.
-
-
16. A method for supplying a revised computer file to a user comprising the steps of:
-
on a first computer system, comparing a revised file to an old file in order to generate a difference file, said difference file being smaller than said revised file; transferring said difference file to a second computer system, said second computer system containing a copy of said old file that matches the old file on said first computer system; and using said difference file and said old file on said second computer system to generate a copy of said revised file on said second computer system, said copy of said revised file on said second computer system matching said revised file on said first computer system. - View Dependent Claims (17, 18)
-
-
19. A difference file for creating a revised file from an existing file comprising:
-
a plurality of copy commands, each copy command including either implicit or explicit position information with reference to an existing file and including copy string count data; a plurality of insert commands for inserting data from an insert database, each insert command including either implicit or explicit position information with reference to the insert database and including insert string count data; and an insert database. - View Dependent Claims (20, 21)
-
-
22. A file differencing system for creating a difference file from an old file and a new file, said difference file containing all the information necessary to generate said new file from said old file, comprising:
-
means for opening an old file; means for opening a new file; an indexer for creating an index from said old file when sufficient memory is detected; a text string index for storing index fields from said old file along with a position indication; a sorter for sorting entries in said text string index; a search engine for searching for strings of data from said new file and looking up the position of those strings of data in said old file; and a command writer for assembling commands and data into a raw difference file including strings of data from said new file not found in said old file. - View Dependent Claims (23)
-
-
24. A method for generating a difference file comprising:
-
a) reading a new file data string from a new file; b) comparing said new file data string to an old file data string at a current position in said old file and if the strings match to at least a predetermined string length, determining the length of the match and writing a copy command, preceded by any accumulated insert data with an insert command, into a difference file and returning to step a; c) searching an old file for the presence of all old file data strings matching said new file data string to at least a predetermined length and returning the longest matching string and storing in said difference file an indication of the position in said old file of said longest matching string along with an indication of a copy operation, preceded by any accumulated insert data with an insert command; d) when no match is found, accumulating one byte of insert data, incrementing a pointer to a current position in said new and old files, and returning to step a e) repeating steps a) through d) until all data in said new file has been read and corresponding insert and copy operations have been written into said difference file. - View Dependent Claims (25, 26, 27, 28)
-
Specification