--- id: anycrc version: "2.0.0" license: Zlib license_treatment: permissive maintenance: active --- # anycrc — The fastest general Python CRC Library License: permissive · Maintenance: active · Downloads: 115.9K/mo ## 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 above — 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 pip install anycrc uv add anycrc 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_current - Install friction: medium - Maintenance: active - Downloads: 115.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags crc hash calculation, cyclic redundancy check, incremental crc update, arbitrary bit width crc, combine crc values, fast crc library, crc checksum, checksum, data-integrity, cryptography-adjacent [View on SkillFed](https://skillfed.io/packages/anycrc) · [View on PyPI](https://pypi.org/project/anycrc/)