I need a binary diff tool that can produce a patch file from compared 8MB files (.dat compressed files) and can merge produced said patch file to the older .dat file (size 8MB).
I tried using msdn's apatch and mpatch, but mpatch produces 7MB diff or patch file when differentiating two 8MB files, when supposedly, the said patch file should be of size 1MB. Another issue is that, when merging said patch file to another .dat file (35MB), it takes above an hour or so but the apatch exe still won't produce a new .dat file.
I used xdelta but issues concerning file size also came up.
Can't use WinMerga as because I'm using .dat files and can't also use vbindiff coz it's just to display difference between files.
anyone knows other binary patch tools?
Thanks very much.
When diffing compressed formats, you have to decompress them first.
Xdelta does this automatically for a few formats, such as gzip, but probably not for .dat
StackOverflow: "Best Diff Tool?" mentions a bunch of binary patch utilities.
StackOverflow: "Binary diff and patch utility" mentions a few more binary patch utilities.
StackOverflow: "Binary diff tool?" mentions yet more binary patch utilities.
But I think you will have the same problem with all of them:
With most compression tools, the "first part" of the two compressed files will be identical, up to the point where the first change occurred.
The "last part" of the two compressed files will be completely different.
Any diff tool (that doesn't cheat by recognizing the files as a compressed file and decompress them) will create a patch file that is more-or-less a bulk copy of the "last part" of the new file.
In your case, the "last part" of the new file is apparently about 7 MB long.
"supposedly, the said patch file should be of size 1MB." How could you possibly know that?
Given two compressed files, a diff utility will generate a patch file that is not much smaller than those files.
As Liam said, you need to diff the original versions of these files before compressing.
Or equivalently, you need to decompress your .dat files into temporary files, and diff those temporary files.
(Optionally, you could use any arbitrary data compression utility to compress your patch files).
I can't tell you how to decompress your .dat files, because I don't know which one of the many kinds of .dat files you have.