For different situation I had the need of comparing 2 file, mostly binary ones and start searching for on the shelve tool.
My constraint was Windows so we have the great fc.exe tool that is supposed to do the job.
Indeed I discovered after some times that my system using fc.exe in production did suffer from nasty bugs
After lost time searching on the web I decided to write a basic replacement tool sfc.exe that should work pretty much correctly.