Skip to main content

A python package exposing the Intel SSE4.2 CRC32C instruction

Project description

https://travis-ci.org/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 exposes to Python the crc32c algorithm implemented in the SSE 4.2 instruction set of Intel CPUs.

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.

Implementation details

By default, if your CPU doesn’t support this instruction, the package will fail to load with an ImportError. If you still need to use the crc32c checksum algorithm this package comes with a software implementation that can be loaded instead. For that set the CRC32C_SW_MODE environment variable to one of the following values:

  • auto: use software implementation if no CPU hardware support is found.

  • force: use software implementation regardless of CPU hardware support.

  • 1: like force, but will eventually be discontinued.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

crc32c-1.6-cp37-cp37m-win_amd64.whl (27.3 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

crc32c-1.6-cp37-cp37m-manylinux1_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.7m

crc32c-1.6-cp36-cp36m-win_amd64.whl (27.3 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

crc32c-1.6-cp36-cp36m-manylinux1_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.6m

crc32c-1.6-cp35-cp35m-win_amd64.whl (27.3 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

crc32c-1.6-cp35-cp35m-win32.whl (26.5 kB view hashes)

Uploaded CPython 3.5m Windows x86

crc32c-1.6-cp35-cp35m-manylinux1_x86_64.whl (25.7 kB view hashes)

Uploaded CPython 3.5m

crc32c-1.6-cp34-cp34m-win_amd64.whl (25.0 kB view hashes)

Uploaded CPython 3.4m Windows x86-64

crc32c-1.6-cp34-cp34m-win32.whl (25.4 kB view hashes)

Uploaded CPython 3.4m Windows x86

crc32c-1.6-cp34-cp34m-manylinux1_x86_64.whl (25.5 kB view hashes)

Uploaded CPython 3.4m

crc32c-1.6-cp33-cp33m-win_amd64.whl (17.3 kB view hashes)

Uploaded CPython 3.3m Windows x86-64

crc32c-1.6-cp33-cp33m-win32.whl (17.8 kB view hashes)

Uploaded CPython 3.3m Windows x86

crc32c-1.6-cp27-cp27mu-manylinux1_x86_64.whl (25.6 kB view hashes)

Uploaded CPython 2.7mu

crc32c-1.6-cp27-cp27m-win_amd64.whl (25.0 kB view hashes)

Uploaded CPython 2.7m Windows x86-64

crc32c-1.6-cp27-cp27m-win32.whl (25.5 kB view hashes)

Uploaded CPython 2.7m Windows x86

crc32c-1.6-cp27-cp27m-manylinux1_x86_64.whl (25.6 kB view hashes)

Uploaded CPython 2.7m

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