For osu! updates, I use an algorithm called bsdiff (bytewise subtraction) designed by Colin Percival. Up until now it has been an external dependency that causes problems with Vista (UAC issues) and occasional instability in the process handling, so I got around to porting it over to .NET last night. I thought for once I’d share this publicly because I think it may be helpful for others out there wanting to do a similar thing.
I only ported the bspatch part over, so you’ll need to create the diff files using the original code (also available as a native windows c++ port here. The sharpziplib library is used for bzip2 stream handling, and only minimal files are included. This makes for a very small binary (19,968 bytes).
While I haven’t benchmarked performance seriously, it should be near-equal to the native code. There is no unsafe code used (although it can be employed very easily for a performance boost).