Patent ID: 7797323

Claim:
A method executable in a computer, comprising: dividing, by the computer, a file into plural segments; for each of at least some of the plural segments, the computer defining plural windows covering different portions of the corresponding segment; according to a predefined criterion, selecting one of the windows associated with the corresponding segment; producing a representative hash based on the portion in the selected window for representing the corresponding segment; calculating hashes for the plural windows using a first hash function, wherein selecting the window is based further on the hashes for the plural windows; and using a second, different hash function to calculate the representative hash, wherein the representative hash is calculated by applying the second hash function to content of the selected window, wherein the first hash function applied to content of the corresponding windows of each segment is a higher speed hash function than the second hash function, such that the first hash function is computed more quickly for the content of the selected window than the second hash function.