Rolling Hash algorithm, inspired by rsync