Algorithms for block-level code alignment of software binary files
First Claim
1. A method for reducing a number of changes between an original file and a new file on a processor-based device, comprising:
- determining an order of code blocks of the new file using index values;
sorting code blocks of the original file and generating a largest increasing subsequence (LIS) of code blocks according to the index values;
generating at least one list of original order numbers of the code blacks of the original file affected by code block movement; and
moving the code blocks of the original file to locations in the original file according to the largest increasing subsequence of code blocks, wherein the code blocks of the original file are aligned in the same order as code blocks of the new file.
4 Assignments
0 Petitions
Accused Products
Abstract
A file differencing and updating system is provided that includes a file differencing component and a file updating component. The file differencing component, or file differencing engine, generates a difference file in a first processor-based or computer system from an original or old version and a new version of an electronic file. Generation of the difference files includes processing to reduce the number of file changes introduced by code block swaps. The processing uses an alignment algorithm, which includes a sorting algorithm, to align the code blocks of the original version in the same order as those of the new version, thereby eliminating the increase in the number of byte-level file differences due to code block swaps. During the alignment operations, the block movements are dynamically recorded at a minimum cost level and encoded for transmission to the file updating component for use in code recovery.
-
Citations
10 Claims
-
1. A method for reducing a number of changes between an original file and a new file on a processor-based device, comprising:
-
determining an order of code blocks of the new file using index values; sorting code blocks of the original file and generating a largest increasing subsequence (LIS) of code blocks according to the index values; generating at least one list of original order numbers of the code blacks of the original file affected by code block movement; and moving the code blocks of the original file to locations in the original file according to the largest increasing subsequence of code blocks, wherein the code blocks of the original file are aligned in the same order as code blocks of the new file.
-
-
2. An apparatus comprising at least one processor coupled to:
-
means for receiving an original file and a new file, wherein the new file includes an updated version of the original file; means for determining an order of code blocks of the new file using index values; means for sorting code blocks of the original file and generating a largest increasing subsequence (LIS) of code blocks according to the index values; means for generating lists of original order numbers of the code blocks of the original file affected by code block movements; and means for moving the code blocks of the original file to locations in the original file according to the largest increasing subsequence of code blocks, wherein the code blocks of the original file are aligned in the same order as code blocks of the new file.
-
-
3. A system for updating electronic files of remote devices, comprising:
-
a first device including a processor coupled to a file differencing engine that generates differences between an original version and a new version of an electronic file by; determining an order of code blocks of the new version using index values; sorting code blocks of the original version and generating a largest increasing subsequence (LIS) of code blocks according to the index values; generating lists of original order numbers of the code blocks of the original version affected by code block movements; moving the code blocks of the original version to locations in the original version according to the largest increasing subsequence of code blocks, wherein the code blocks of the original version are aligned in the saint order as code blocks of the new version; generating an encoded list including information of the code block moves; transmitting the encoded list to a second device; and a file updating engine coupled to a processor of the second device, the file updating engine generating a copy of the new version using a difference file and information of the code block moves. - View Dependent Claims (4)
-
-
5. A method for generating difference flies on a processor-based device, comprising:
-
receiving an original file and a new file, wherein the new file includes an updated version of the original file; determining an order of code blocks of the new tile using index values; sorting code blocks of the original file and generating a largest increasing subsequence (LIS) of code blocks according to the index values; generating lists of original order numbers of the code blocks of the original file affected by code block movements; moving the code blocks of the original file to locations in the original file according to the largest increasing subsequence of code blocks, wherein the code blocks of the original file are aligned in the same order as code blocks of the new file; and generating an encoded list including information of the code block moves. - View Dependent Claims (6, 7, 8, 9)
-
-
10. A computer readable medium including executable instructions which, when executed in a processing system, reduce a number of changes between an original file and a new file by:
-
determining an order of code blocks of the new file using index values; sorting code blocks of the original file and generating a largest increasing subsequence (LIS) or code blocks according to the index values; generating lists of original order numbers of the code blocks of the original file affected by code block movements; and moving the code blocks of the original file to locations in the original file according to the largest increasing subsequence of code blocks, wherein the code blocks of the original file are aligned in the same order as code blocks of the new file.
-
Specification