I need to write a tool in C++ to determine the changed bits in a file compared against another file for replication. What would be the best method of accomplishing this?

I don't have a specific OS or library in mind, I'm open to suggestions. My primary goal is reducing the amount of network traffic involved in replicating.