Haskell code for rsync-style reliable block detection