Useful Binary Diff Tool (other than msdn[apatch and mpatch], xdelta, bsdiff, vbindiff and winmerge) [closed]

不羁的心 提交于 2019-12-10 18:59:44

问题


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.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/3707962/useful-binary-diff-tool-other-than-msdnapatch-and-mpatch-xdelta-bsdiff-vbi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!