Generic Diff format http://www.w3.org/TR/NOTE-gdiff-19970901 The output is a series of tokens: There are two kinds of GDIFF commands. The first kind is the DATA command (1 through 248). Each data command is followed by a number of data bytes which are copied onto the output stream. The second kind of GDIFF command is the COPY command (249 through 255). Each COPY command is followed by two arguments: position and length. The arguments specify the portion of the old file that must be copied onto the output stream. This doesn't tell us where to put the signature data, but if we're going to use a standard differenc format it's probably better to keep the signature data out of it. Mm, perhaps it would be nice if the protocol allowed for `application-defined' commands, but that's not so bad. We can put the server-generated signature after the EOF token or in an HTTP Trailer. There's something quite symmetrical about putting it in a trailer, since it's going to come back up to the server in an HTTP Header. I wasn't so positive on this format in the past, but after talking to paulus a bit it looks really good: