skillfed

anycrc

The fastest general Python CRC Library

anycrc v2.0.0 115.9K downloads/30d#12,232 on PyPI5
Permissive license Zlib Active released

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 anycrc

uv

uv add anycrc

poetry

poetry add anycrc

Installing 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

crc hash calculationcyclic redundancy checkincremental crc updatearbitrary bit width crccombine crc valuesfast crc librarycrc checksum
checksumdata-integritycryptography-adjacent

More Software Development packages