Python 2.7 has reached end of support and will be deprecated on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7 applications, even if your organization previously used an organization policy to re-enable deployments of legacy runtimes. Your existing Python 2.7 applications will continue to run and receive traffic after their deprecation date. We recommend that you migrate to the latest supported version of Python.

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年06月16日 UTC.