Skip to content

A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.

License

Notifications You must be signed in to change notification settings

overcat/fastcrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

63a6036 · Oct 23, 2024

History

54 Commits
Oct 23, 2024
May 23, 2021
Jan 2, 2024
Jan 2, 2024
Oct 23, 2024
Jan 2, 2024
May 22, 2021
Jan 2, 2024
Oct 23, 2024
Oct 23, 2024
Oct 23, 2024
May 22, 2021
Jan 2, 2024
Oct 23, 2024
Mar 16, 2024

Repository files navigation

fastcrc

Read the Docs PyPI Python - Version

A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.

Installation

pip install fastcrc

Usage

from fastcrc import crc8, crc16, crc32, crc64

data = b"123456789"
print(f"crc8 checksum with cdma2000 algorithm: {crc8.cdma2000(data)}")
print(f"crc16 checksum with xmodem algorithm: {crc16.xmodem(data)}")
print(f"crc32 checksum with aixm algorithm: {crc32.aixm(data)}")
print(f"crc64 checksum with ecma_182 algorithm: {crc64.ecma_182(data)}")
print(f"crc16 checksum with xmodem algorithm (with initial data): {crc16.xmodem(b'56789', crc16.xmodem(b'1234'))}")

Documentation

fastcrc's documentation can be found at https://fastcrc.readthedocs.io

License

fastcrc is licensed under MIT License.

Thanks

fastcrc is made possible by crc-rs.