code: def _compare_file(self, local, remote):
          
          assert isinstance(local, FileEntry) and isinstance(remote, FileEntry)
  
          if not local or not remote:
              write("    Files cannot be compared ({} != {}).".format(local, remote))
              return False
          elif local.size != remote.size:
              write(
                  "    Files are different (size {:,d} != {:,d}).".format(
                      local.size, remote.size
                  )
              )
              return False
  
          with local.target.open_readable(
              local.name
          ) as fp_src, remote.target.open_readable(remote.name) as fp_dest:
              res, ofs = byte_compare(fp_src, fp_dest)
  
          if not res:
              write("    Files are different at offset {:,d}.".format(ofs))
          else:
              write("    Files are equal.")
          return res
docs: Byte compare two files (early out on first difference).