Rsync Algorithm in Python[1]