Patching strings

The patcher is designed for offline computation of large patchfiles, for the purpose of upgrading a downloadable game to the latest version. The problem it is trying to solve is: generate a patchfile within a reasonable timeframe (less than an hour, say) for arbitrarily large data sets. Given this constraint, attempt to make the smallest patchfile that can reasonably be determined in that timeframe.

Note that finding the smallest patchfile for a particular data set is a mathematically intractable problem. To answer this definitively, you would have to exhaustively search the entire problem space, which could take thousands of years for some large data sets. So our patcher uses a few heuristics to short-circuit this search considerably, and is capable of generating decently small patchfiles within about half an hour or so, even for very large data sets.

But it was never designed to generate tiny patchfiles in real time. That’s a completely different problem. If you require this feature, you’re probably better off writing a different algorithm to generate these patchfiles based on the knowledge you have about the nature of the data.

David