Stay organized with collections
Save and categorize content based on your preferences.
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.
Parametersdata – byte array, string or iterable over bytes.
Returns32-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.
Parameterscrc – 32-bit checksum as long.
Returnsfinalized 32-bit checksum as long
- google.appengine.api.files.crc32c.crc_update(crc, data)source
Update CRC-32C checksum with data.
ParametersReturns32-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 2023-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-04 UTC."],[[["This module implements CRC-32C checksumming, as detailed in rfc3720 section B.4, and is based on a Python translation of C code generated by pycrc 0.7.1."],["The `crc(data)` function computes the CRC-32C checksum for a given byte array, string, or iterable of bytes, returning a 32-bit checksum as a long integer."],["The `crc_finalize(crc)` function finalizes the CRC-32C checksum, and should be the last step of the calculation, returning the finalized 32-bit checksum as a long integer."],["The `crc_update(crc, data)` function allows updating an existing 32-bit CRC-32C checksum with additional data, and returns the updated 32-bit checksum as a long integer."]]],[]]