def _fbequal(fpath1, fpath2):
    """Compare files byte by byte. If files are equal return True,
       False otherwise.
       fpath1 and fpath2 are file paths.
    """
    with open(fpath1, 'rb') as f1:
        with open(fpath2, 'rb') as f2:
            while True:
                b1 = f1.read(1)
                b2 = f2.read(1)
                if b1 != b2:
                    return False
                if not b1 or not b2:
                    break
    if not b1 and not b2:
        return True
    return False
