diffing two large compressed (.bz2 or .lzma) files?
Is there a utility that can efficiently output the differences between
two large compressed files? Note: one can assume that the compressed
files just differ in a few places, so that the utility MUST NOT take
more than a few megabytes (whether in RAM, swap or disk).
bzdiff (from the bzip2 package) first decompresses one of the file to
a temporary file, thus is not a solution (it filled up my partition!).
I've also tried process substitution (with zsh, but this is also
supported by bash):
but in both cases, diff takes too much swap (I think the problem with
process substitution is that diff cannot control how the files are
decompressed, but perhaps diff doesn't cope well with this either).
I've taken the example of .bz2, but I may switch to lzma. So, I'm
interested in possibilities for both.