Well, basically it's just CRC . The word “running” means that you must calculate it “on the fly”, because the data is coming in, or that you are doing a cumulative calculation (this is how CRC is implemented).
You have a good example:
# Or you can compute the running CRC: $crc = 0; $crc = Archive::Zip::computeCRC32( 'abcdef', $crc ); $crc = Archive::Zip::computeCRC32( 'ghijkl', $crc );
Note that the variable $crc set to 0 at the beginning and updated twice . The CRC calculation algorithm uses the previously calculated CRC value and update . That's why it is sometimes called running CRC.
From your code, I assume that you already have an implementation, if not, just Google for CRC32.
source share