Binary patch-generation in C#

前端 未结 6 1320
庸人自扰
庸人自扰 2020-12-25 13:56

Does anyone have, or know of, a binary patch generation algorithm implementation in C#?

Basically, compare two files (designated old and new), and

相关标签:
6条回答
  • 2020-12-25 14:35

    Sorry I couldn't be more help. I would definately keep looking at xdelta because I have used it a number of times to produce quality diffs on 600MB+ ISO files we have generated for distributing our products and it performs very well.

    0 讨论(0)
  • 2020-12-25 14:44

    bsdiff was designed to create very small patches for binary files. As stated on its page, it requires max(17*n,9*n+m)+O(1) bytes of memory and runs in O((n+m) log n) time (where n is the size of the old file and m is the size of the new file).

    The original implementation is in C, but a C# port is described here and available here.

    0 讨论(0)
  • 2020-12-25 14:49

    Have you seen VCDiff? It is part of a Misc library that appears to be fairly active (last release r259, April 23rd 2008). I haven't used it, but thought it was worth mentioning.

    0 讨论(0)
  • 2020-12-25 14:51

    If this is for installation or distribution, have you considered using the Windows Installer SDK? It has the ability to patch binary files.

    http://msdn.microsoft.com/en-us/library/aa370578(VS.85).aspx

    0 讨论(0)
  • 2020-12-25 14:52

    It might be worth checking out what some of the other guys are doing in this space and not necessarily in the C# arena either.

    This is a library written in c#

    SVN also has a binary diff algorithm and I know there's an implementation in python although I couldn't find it with a quick search. They might give you some ideas on where to improve your own algorithm

    0 讨论(0)
  • 2020-12-25 14:53

    This is a rough guideline, but the following is for the rsync algorithm which can be used to create your binary patches.

    http://rsync.samba.org/tech_report/tech_report.html

    0 讨论(0)
提交回复
热议问题