Skip to main content

A python package implementing the crc32c algorithmin hardware and software

Project description

https://travis-ci.com/ICRAR/crc32c.svg?branch=master https://ci.appveyor.com/api/projects/status/lamys36iude1x180/branch/master?svg=true https://badge.fury.io/py/crc32c.svg

This package implements the crc32c checksum algorithm. It automatically chooses between a hardware-based implementation (using the CRC32C SSE 4.2 instruction of Intel CPUs), or a software-based one when no hardware support can be found.

Because crc32c is in PyPI, you can install it with:

pip install crc32c

Supported platforms are Linux and OSX using the gcc and clang compilers, and Windows using the Visual Studio compiler. Other compilers in Windows (MinGW for instance) might work. Binary wheels are also provided in PyPI for major platforms/architectures.

Implementation details

By default, if your CPU doesn’t support this instruction, the package will fallback to use a software implementation of the crc32c checksum algorithm. This behavior can be changed by setting the CRC32C_SW_MODE environment variable to one of the following values:

  • auto: same as if unset, will eventually be discontinued.

  • force: use software implementation regardless of hardware support.

  • none: fail to import the module with an ImportError if no hardware support is found (old 1.x default behavior).

Both the hardware- and software-based algorithms are based on Mark Adler’s code, with some modifications required to make the code more portable and fit for inclusion within this python package.

License

This package is licensed under the LGPL-2.1 license.

The original crc32c algorithm’s code, both software and hardware, are licensed under the BSD 3-clause license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crc32c-2.0.tar.gz (25.1 kB view hashes)

Uploaded Source

Built Distributions

crc32c-2.0-cp38-cp38-manylinux1_x86_64.whl (26.4 kB view hashes)

Uploaded CPython 3.8

crc32c-2.0-cp37-cp37m-win_amd64.whl (27.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

crc32c-2.0-cp37-cp37m-manylinux1_x86_64.whl (26.2 kB view hashes)

Uploaded CPython 3.7m

crc32c-2.0-cp37-cp37m-macosx_10_6_x86_64.whl (24.8 kB view hashes)

Uploaded CPython 3.7m macOS 10.6+ x86-64

crc32c-2.0-cp36-cp36m-win_amd64.whl (27.6 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

crc32c-2.0-cp36-cp36m-manylinux1_x86_64.whl (26.2 kB view hashes)

Uploaded CPython 3.6m

crc32c-2.0-cp36-cp36m-macosx_10_6_x86_64.whl (24.8 kB view hashes)

Uploaded CPython 3.6m macOS 10.6+ x86-64

crc32c-2.0-cp35-cp35m-win_amd64.whl (27.5 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

crc32c-2.0-cp35-cp35m-win32.whl (26.8 kB view hashes)

Uploaded CPython 3.5m Windows x86

crc32c-2.0-cp35-cp35m-manylinux1_x86_64.whl (26.2 kB view hashes)

Uploaded CPython 3.5m

crc32c-2.0-cp35-cp35m-macosx_10_6_x86_64.whl (24.7 kB view hashes)

Uploaded CPython 3.5m macOS 10.6+ x86-64

crc32c-2.0-cp34-cp34m-win_amd64.whl (25.3 kB view hashes)

Uploaded CPython 3.4m Windows x86-64

crc32c-2.0-cp34-cp34m-win32.whl (25.7 kB view hashes)

Uploaded CPython 3.4m Windows x86

crc32c-2.0-cp34-cp34m-manylinux1_x86_64.whl (26.0 kB view hashes)

Uploaded CPython 3.4m

crc32c-2.0-cp34-cp34m-macosx_10_6_x86_64.whl (24.7 kB view hashes)

Uploaded CPython 3.4m macOS 10.6+ x86-64

crc32c-2.0-cp33-cp33m-win_amd64.whl (17.7 kB view hashes)

Uploaded CPython 3.3m Windows x86-64

crc32c-2.0-cp33-cp33m-win32.whl (18.1 kB view hashes)

Uploaded CPython 3.3m Windows x86

crc32c-2.0-cp27-cp27mu-manylinux1_x86_64.whl (26.0 kB view hashes)

Uploaded CPython 2.7mu

crc32c-2.0-cp27-cp27m-win_amd64.whl (25.2 kB view hashes)

Uploaded CPython 2.7m Windows x86-64

crc32c-2.0-cp27-cp27m-win32.whl (25.7 kB view hashes)

Uploaded CPython 2.7m Windows x86

crc32c-2.0-cp27-cp27m-manylinux1_x86_64.whl (26.0 kB view hashes)

Uploaded CPython 2.7m

crc32c-2.0-cp27-cp27m-macosx_10_6_x86_64.whl (24.7 kB view hashes)

Uploaded CPython 2.7m macOS 10.6+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page