star-crc 0.1.0
Cyclic redundancy checks, bit by bit
Public state: Released & Verified. The registry label is RELEASED. What the states mean →
Apache-2.0 Released & Verified single file
Summary
The CRC-16 of CCSDS transfer frames, CRC-16/XMODEM, CRC-32, CRC-32C and any Rocksoft-model CRC of 8 to 64 bits computed through the defining shift register; on 499 messages and nine variants identical to fastcrc (4491 values), to CPython binascii and zlib (1497) and to a polynomial division over GF(2) in SymPy (1611); reproduces the nine catalogue check values.
Run in your browser
Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).
Runs in the browser: all 65 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026. Open it in the Workspace →
Use it on your computer
No account and no GitHub needed. Download, then install with one command:
- Install file · star_crc-0.1.0-py3-none-any.whl 3 kB
- Single file — copy it alongside your code · star_crc.py 3 kB
- Source code (.zip) 21 kB
python -m pip install star_crc-0.1.0-py3-none-any.whlIn Python: import star_crc
Cite it, and its bill of materials
For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.
@software{cavazzini_star_crc_0_1_0,
author = {Cavazzini, Andrea},
title = {{star-crc}: Cyclic redundancy checks, bit by bit},
version = {0.1.0},
year = {2026},
url = {https://andrea07072000.github.io/S.T.A.R.-/software/star_crc/},
note = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}
For developers
Install directly from the public repository:
python -m pip install "star-crc @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_crc"
Technical sheet
Requirements
- R1
crc16_ccsds(data)is the Frame Error Control Field of CCSDS TM, AOS and TC transfer frames (polynomial 0x1021, register preset to all ones);crc16_xmodem,crc32andcrc32care the other three named variants. - R2
crc(data, width, poly, init, reflect_in, reflect_out, xor_out)computes any CRC described by those six parameters, width 8 to 64. The message goes through the shift register one bit at a time: no table. - R3 Measured on 499 messages of 0 to 300 bytes through nine variants: identical to fastcrc on 4491 values, to CPython
binascii.crc_hqxandzlib.crc32on 1497, and to the remainder of a polynomial division over GF(2) done in SymPy (no CRC code involved) on 1611. No mismatch. - R4 Every function returns an int in [0, 2^width) or raises
ValueError: data that is not bytes or bytearray or is longer than 65536 bytes, a width, polynomial, preset or final XOR out of range, an even polynomial, reflection flags that are not bools.
Limits (what is not claimed)
A CRC detects errors with a known probability; it does not authenticate and does not correct. This module computes check values: it does not frame, randomise or decode telemetry (see star_telemetry in this repository). Bit-by-bit processing in Python is slow (about 0.2 s for 65536 bytes): it is a reference and a verifier, not a link-rate implementation. Widths below 8 or above 64 and polynomials without the term 1 are refused, not supported.
Release gate
Computed by the registry from the result files, with the same function that decides RELEASED.
- Mutation score, latest measure of each module (needs at least 0.850)
- star_crc.py 0.988 (2026-10-07)
- Independent implementations written by others (needs 2)
- CPython binascii.crc_hqx and zlib.crc32, fastcrc (Rust crc tables), SymPy polynomial division over GF(2)
- Result
- Released & Verified
Evidence in the registry
| Check | Status | Recorded | What was observed |
|---|---|---|---|
| Unit tests | VERIFIED | 2026-10-07 | 65 passed in 0.72s |
| Review | VERIFIED | 2026-10-07 | Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed |
| Review | VERIFIED | 2026-10-07 | Re-running the cross-check gives a byte-identical evidence file |
| Reference value | VERIFIED | 2026-10-07 | crc16_ccsds = 0x29B1, crc16_xmodem = 0x31C3, crc32 = 0xCBF43926, crc32c = 0xE3069283 (suite: 65 passed in 0.72s) |
| Cross-check with independent libraries | VERIFIED | 2026-10-07 | star_crc computes the CCSDS frame CRC-16, CRC-16/XMODEM, CRC-32, CRC-32C and any Rocksoft-model CRC of width 8 to 64 bit by bit |
| Benchmark | VERIFIED | 2026-10-07 | mismatches: 0 of 7599 comparisons |
| Clean install from the release tag | VERIFIED | 2026-10-07 | pytest outside the tree: 65 passed in 0.44s |
Fingerprints (SHA-256)
| star_crc-0.1.0-py3-none-any.whl | 743b7ca13aa60b40edcc446907f297b7ca5903e219ffca19040db83855b5af4a |
| star_crc.py | f76adb50d0c6577919db8b739f61e62c7a42ed1ef5c8e9dadb5754c8c999d3d2 |
| star_crc-0.1.0-source.zip | 86e0a5ee4c8e635c7e948396cd6c594d35fb7424d5111cb05b1e9884a0a6b425 |
