jmacd / xdelta

open-source binary diff, delta/differential compression tools, VCDIFF/RFC 3284 delta compression
http://xdelta.org
1.14k stars 189 forks source link

How to tell if old and new files are identical #240

Open Tithen-Firion opened 6 years ago

Tithen-Firion commented 6 years ago

I know I can hash them before using xdelta but that would mean reading them from disk twice.

Some switch that deletes created diff and returns specific exit code on identical files would be perfect but I need something that works now.

I'm pretty sure I need to use one of those commands but don't know which one and what to look for.

special commands for VCDIFF inputs:
    printdelta  print information about the entire delta
    printhdr    print information about the first window
    printhdrs   print information about all windows

Edit: if sum of all VCDIFF data section length: from printhdrs equals 0, files are identical.

I'd still love to see the switch I mentioned before implemented so I'm keeping this open.