anycrc
The fastest general Python CRC Library
What it is and what it does
anycrc is a CRC (cyclic redundancy check) calculation library that supports arbitrary bit widths up to 64 bits. It provides both pre-built models for standard CRC variants (like CRC32-MPEG-2) and the ability to define custom CRC parameters (polynomial, initial value, reflection flags, XOR output). The package is designed for performance and supports three main workflows: calculating a CRC over complete data in one call, updating a CRC incrementally by processing data in chunks, and combining two independently calculated CRCs into a single result.
The library depends on bitarray for bit-level operations, particularly when working with data that is not byte-aligned. It supports both byte-oriented and bit-oriented interfaces, with separate methods for each (calc/calc_bits, combine/combine_bits). The package is actively maintained and provides a command-line interface to list available pre-built CRC models.
Use it for:
- Verify data integrity in network protocols or file formats that specify standard CRC checksums like CRC32-MPEG-2
- Implement custom CRC validation for proprietary or legacy systems with non-standard polynomial or parameter configurations
- Process large files or streams by calculating CRC incrementally in chunks to avoid loading entire data into memory
- Combine CRC results from distributed or parallel processing where partial checksums need to be merged into a final result
- Work with bit-level data alignment in protocols or formats where CRC must be calculated over a non-byte-aligned portion of data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Calculates CRC hashes of arbitrary bit widths (up to 64 bits) with support for incremental updates and combining partial CRCs, using either pre-built models or custom parameters.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and solves a specific problem (fast, flexible CRC calculation) with a clean API. Medium install friction is acceptable given the compiled-wheel distribution across platforms. Suitable for any project needing CRC validation beyond Python's built-in hashlib.
Install
anycrc on PyPI
pip
pip install anycrcuv
uv add anycrcpoetry
poetry add anycrcInstalling anycrc
Before you install
Medium install friction due to compiled wheels for multiple platforms and Python versions. Actively maintained with recent commits; last release 143 days ago and repository not archived.
License in practice
Zlib license is permissive and places minimal restrictions on use, modification, or distribution in both open-source and proprietary contexts.
Quickstart
pip install anycrc
import anycrc
crc32 = anycrc.Model('CRC32-MPEG-2')
result = crc32.calc(b'Hello World!')
print(result) # 2498069329
Requires Python 3.8 or later; bitarray is a runtime dependency for bit-level operations.
Verify before relying
- Whether the benchmark comparison (26.65 GiB/s vs other libraries) reflects current performance or was from an earlier version
- Whether bitarray dependency is optional or required for all use cases
Package facts
| License | Zlib (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — bitarray |
| Maintenance | actively maintained — 143 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,922/month — #12,232 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: anycrc-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl; anycrc-2.0.0-cp310-cp310-macosx_11_0_arm64.whl; anycrc-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; anycrc-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; anycrc-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl; anycrc-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl; anycrc-2.0.0-cp310-cp310-win32.whl; anycrc-2.0.0-cp310-cp310-win_amd64.whl; anycrc-2.0.0-cp310-cp310-win_arm64.whl; anycrc-2.0.0-cp311-abi3-macosx_10_9_x86_64.whl; anycrc-2.0.0-cp311-abi3-macosx_11_0_arm64.whl; anycrc-2.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; anycrc-2.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; anycrc-2.0.0-cp311-abi3-musllinux_1_2_aarch64.whl; anycrc-2.0.0-cp311-abi3-musllinux_1_2_x86_64.whl; anycrc-2.0.0-cp311-abi3-win32.whl; anycrc-2.0.0-cp311-abi3-win_amd64.whl; anycrc-2.0.0-cp311-abi3-win_arm64.whl; anycrc-2.0.0-cp314-cp314t-macosx_10_15_x86_64.whl; anycrc-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
crcCalculate, verify, and manage CRC checksums…
permissive · top 5,000 on PyPI
fastcrcfastcrc computes CRC checksums (8, 16, 32, and…
permissive · top 5,000 on PyPI
crcmodComputes Cyclic Redundancy Check (CRC) values…
permissive · top 5,000 on PyPI
crccheckCalculates CRC and checksum values from binary…
permissive · top 5,000 on PyPI
libscrclibscrc provides a compiled library for…
copyleft · top 15,000 on PyPI
crcengineCrcEngine provides table-based and bit-bashing…
copyleft · top 15,000 on PyPI
crc32cComputes CRC32C checksums using hardware…
copyleft · top 1,000 on PyPI
filehashCalculates and verifies file checksums and…
permissive · top 15,000 on PyPI
bitmathbitmath converts and performs arithmetic on…
permissive · top 15,000 on PyPI
spookyhashProvides fast 32-, 64-, and 128-bit hashing via…
permissive · top 15,000 on PyPI