{"id":5218,"library":"fastcrc","title":"Fast CRC Checksum Library","description":"fastcrc is a hyper-fast Python module for computing CRC (Cyclic Redundancy Check) checksums across 8, 16, 32, and 64-bit standards. It leverages highly optimized Rust code for performance. The current version is 0.3.5, and it maintains an active release cadence with several updates per year, focusing on performance, platform support, and new CRC algorithms.","status":"active","version":"0.3.5","language":"en","source_language":"en","source_url":"https://github.com/overcat/fastcrc","tags":["checksum","crc","performance","binary","data integrity"],"install":[{"cmd":"pip install fastcrc","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"Imports specific CRC bit-width modules to access various algorithms.","symbol":"crc8","correct":"from fastcrc import crc8"},{"note":"Imports specific CRC bit-width modules to access various algorithms.","symbol":"crc16","correct":"from fastcrc import crc16"},{"note":"Imports specific CRC bit-width modules to access various algorithms.","symbol":"crc32","correct":"from fastcrc import crc32"},{"note":"Imports specific CRC bit-width modules to access various algorithms.","symbol":"crc64","correct":"from fastcrc import crc64"}],"quickstart":{"code":"from fastcrc import crc8, crc16, crc32, crc64\n\ndata = b\"123456789\"\n\n# Compute CRC-8 using the cdma2000 algorithm\nprint(f\"crc8 checksum with cdma2000 algorithm: {crc8.cdma2000(data)}\")\n\n# Compute CRC-16 using the xmodem algorithm\nprint(f\"crc16 checksum with xmodem algorithm: {crc16.xmodem(data)}\")\n\n# Compute CRC-32 using the aixm algorithm\nprint(f\"crc32 checksum with aixm algorithm: {crc32.aixm(data)}\")\n\n# Compute CRC-64 using the ecma_182 algorithm\nprint(f\"crc64 checksum with ecma_182 algorithm: {crc64.ecma_182(data)}\")\n\n# Chained CRC calculation with initial data\ninitial_crc = crc16.xmodem(b'1234')\nfinal_crc = crc16.xmodem(b'56789', initial_crc)\nprint(f\"crc16 checksum with xmodem algorithm (chained): {final_crc}\")","lang":"python","description":"This quickstart demonstrates how to import and use the fastcrc library to compute checksums for various CRC standards (8, 16, 32, 64-bit) using different algorithms. It also shows an example of chained CRC calculation using the optional 'initial' parameter."},"warnings":[{"fix":"Upgrade to Python 3.7 or newer, or pin fastcrc to <0.3.0.","message":"Support for Python 3.6 was dropped in version 0.3.0. Users on Python 3.6 must use an older version of fastcrc.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Avoid using these experimental functions for production code, or be prepared for potential removal or API changes.","message":"The functions `fastcrc.crc16.ibm_refin` and `fastcrc.crc32.reversed_reciprocal_refin` were introduced as experimental in v0.2.1 and may be removed in future releases without further notice.","severity":"deprecated","affected_versions":">=0.2.1"},{"fix":"Ensure data is encoded to bytes (e.g., `my_string.encode('utf-8')`) before passing it to CRC functions.","message":"All CRC functions in `fastcrc` expect bytes-like objects as input data. Passing other types (e.g., string) will result in a TypeError.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the documentation for proper usage of the `initial` parameter when performing incremental CRC calculations across multiple data chunks.","message":"Version 0.2.0 introduced an `initial` optional parameter to all CRC functions, allowing for chained CRC calculations. If migrating from older versions, ensure you are aware of this parameter for multi-part data processing.","severity":"gotcha","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}