google.appengine.api.files.crc32c module

Summary

Implementation of CRC-32C checksumming as in rfc3720 section B.4.

See http://en.wikipedia.org/wiki/Cyclic_redundancy_check for details on CRC-32C.

This code is a manual python translation of c code generated by pycrc 0.7.1 (http://www.tty1.net/pycrc/). Command line used: ‘./pycrc.py –model=crc-32c –generate c –algorithm=table-driven’

Contents

google.appengine.api.files.crc32c.crc(data)source

Compute CRC-32C checksum of the data.

Parameters

data – byte array, string or iterable over bytes.

Returns

32-bit CRC-32C checksum of data as long.

google.appengine.api.files.crc32c.crc_finalize(crc)source

Finalize CRC-32C checksum.

This function should be called as last step of crc calculation.

Parameters

crc – 32-bit checksum as long.

Returns

finalized 32-bit checksum as long

google.appengine.api.files.crc32c.crc_update(crc, data)source

Update CRC-32C checksum with data.

Parameters
  • crc – 32-bit checksum to update as long.

  • data – byte array, string or iterable over bytes.

Returns

32-bit updated CRC-32C as long.