skillfed

crcengine

A library for CRC calculation and code generation

crcengine v0.4.0.post1 114.6K downloads/30d#12,286 on PyPI9
Copyleft license GPL-3.0-only DORMANT released

What it is and what it does

CrcEngine is a Python library for computing cyclic redundancy checks (CRCs) using either pre-computed lookup tables or bit-by-bit algorithms. It ships with built-in support for common CRC variants (CRC8, CRC16, CRC32, CRC64) across different polynomial definitions and reflection modes, and allows you to define custom CRC algorithms by specifying polynomial, initial value, and output transformation parameters.

Beyond runtime calculation, the library can generate standalone C code for a given CRC algorithm, intended as a middle ground between size and speed for embedded systems—useful when you need to verify checksums in C without runtime table generation. The library depends on jinja2 for code templating and importlib-metadata for package introspection.

Use it for:

  • Verify data integrity in network protocols or file formats that use standard CRC checksums like CRC32.
  • Implement custom CRC algorithms for proprietary or domain-specific checksum schemes by defining polynomial parameters.
  • Generate optimized C code for CRC validation in embedded firmware or performance-critical C applications.
  • Cross-validate checksums between Python and C implementations by using the same algorithm parameters.
  • Build data transmission or storage systems that need fast, deterministic checksum computation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

CrcEngine provides table-based and bit-bashing CRC calculation with support for pre-defined algorithms (CRC8, CRC16, CRC32, CRC64 variants) and custom algorithm creation, plus C code generation for embedded use.

Yes, if you need CRC calculation and can accept dormant maintenance. The library is stable for its narrow scope (CRC math is well-defined), has no known vulnerabilities, low install friction, and works on modern Python versions. However, maintenance is dormant; use it for non-critical checksums or where you can fork if needed. GPL-3.0-only copyleft is a hard blocker for proprietary closed-source projects.

Install

crcengine on PyPI

pip

pip install crcengine

uv

uv add crcengine

poetry

poetry add crcengine

Installing crcengine

Before you install

Low install friction with only two runtime dependencies (importlib-metadata, jinja2). Maintenance is dormant—last release was in April 2023 and last commit in February 2024—so expect no active bug fixes or feature updates.

License in practice

Licensed under GPL-3.0-only (copyleft). Any derivative work or bundled distribution must also be open-source under GPL-3.0; proprietary projects cannot use this library without separate licensing.

Quickstart

pip install crcengine

import crcengine
crc_algorithm = crcengine.new('crc32-bzip2')
result = crc_algorithm(b'123456789')
print(f'CRC=0x{result:08x}')

Verify before relying

  • Whether dormant maintenance affects real-world reliability for production checksum use cases.
  • Performance characteristics of table-based vs. bit-bashing implementations for large data volumes.
  • Compatibility of generated C code with modern toolchains and embedded platforms.

Package facts

License GPL-3.0-only (copyleft)
Python support supports the current Python release (>=3.7.2,<4.0.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — importlib-metadata, jinja2
Maintenance dormant — 1,216 days since the last release
Last repo commit
First released
Downloads 114,626/month — #12,286 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: crcengine-0.4.0.post1-py3-none-any.whl

Keywords: crcengine, CRC, cyclic, redundancy, check, checksum, code-generation, Castagnoli, CRC32, CRC16-CCITT

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishProgramming Language :: CProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: CommunicationsTopic :: System :: NetworkingTopic :: Utilities

Tags

CRC calculation librarycyclic redundancy checkCRC32 CRC16 implementationchecksum computationCRC code generationdata integrity verificationpolynomial-based checksum
checksumdata-integritycode-generation

More Utilities packages