I have to write a utility to compare two versions of a binary file (new and old) and then to extract the differences between the two versions of the file. The extracted list will then be used to update the old file and make it the same as the new one (so basically it is a patch utility). I have written it but find that the patch files it creates are larger than those that I can obtain by using diff or some other shareware patch utilities I have tried. The cause seems to be a problem in the routine where I synchronize the two files after a difference is found, but I just cannot get my head around this logic. If anyone has any good algorithms or can help me out with this I really would appreciate it - my deadline is looming nearer!