Bill Petheram wrote: > > I have looked at the xdelta code and it is rather obscure, a JNI > approach seems much better to me. > > I willing to have a look, but is there any existing java code to hook into?
I have started to look into a java implementation of the xdelta algorithm. It is fairly easy once you have delved into the details of the algorithm. The tricky part is using the adler32 fingerprint algorithm in a speedy manner, and getting the hashtables right. When I have something running, I can post some info. I was thinking about using the generic diff format, http://www.w3.org/TR/NOTE-gdiff-19970901.html, to store the difference. This format is compact and not very difficult to work with. Note that when using differences in a programming environment, you would probably want a diff style representation. The xdelta algorithm is a copy/insert algorithm, whereas diff is a insert/delete algorithm, which makes it much easier to read for a human. It is possible to transform from one representation to the other, but I think that in cases where a human readable representation is wanted, one shuld use the diff engine. This could probably be made configurable, so that different diff engines was selected based on content type. Some other java diff implementations; http://www.bmsi.com/java/#diff http://jrcs.sourceforge.net/ http://www.suigeneris.org/jrcs/ A initial approach could also be to use diff for text files and just store complete binary files for verything else, just as cvs does. -- -Torgeir -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
