+-- given the checksum a(k, l) and b(k, l), find checksum a(k+1, l+1), b(k+1, l+1)
+checksumUpdate :: Checksum -> BL.ByteString -> Checksum
+checksumUpdate curCheckSum bs = (csval, oldStrtIdx + 1, oldEndIdx + 1)
+ where (oldChecksum, oldStrtIdx, oldEndIdx) = curCheckSum
+ csval = a `mod` m + ((fromIntegral b) `mod` m) `shiftL` size
+ m = 2^size
+ size = 16
+ bold = oldChecksum `shiftR` size
+ aold = oldChecksum .&. (m - 1)
+ xk = head $ drop oldStrtIdx $ BL.unpack bs
+ xlPlus1 = head $ drop (oldEndIdx + 1) $BL.unpack bs
+ a = aold - fromIntegral xk + fromIntegral xlPlus1
+ b = a + bold - (fromIntegral (oldEndIdx - oldStrtIdx + 1))
+