php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71890 crc32c checksum algorithm
Submitted: 2016-03-24 13:26 UTC Modified: -
Votes:11
Avg. Score:4.8 ± 0.6
Reproduced:8 of 9 (88.9%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: wookie at no-way dot org Assigned:
Status: Closed Package: hash related
PHP Version: Next Minor Version OS:
Private report: No CVE-ID: None
 [2016-03-24 13:26 UTC] wookie at no-way dot org
Description:
------------
Hi I would like to use Castagnoli's crc32c checksum polynomial on a progressive stream, but it does not seem to be available in hash_algo(). When dealing with streams crc32c generally performs better as a checksum than normal crc32. It would be a nice (IMHO) algorithm feature to include.

It would be better that this gets implemented natively as it could take advantage of hardware support if it exists. It is about 3x faster than crc32 in certain conditions and about 7-9x faster when hardware assisted.

Just as an indicator of it's popularity:

Google seems to be also using crc32c in their cloud storage api:
https://cloud.google.com/storage/docs/gsutil/addlhelp/CRC32CandInstallingcrcmod

There is also an implementation for nodejs:
https://www.npmjs.com/package/fast-crc32c

tnx.



Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-04 15:48 UTC] lisachenko dot it at gmail dot com
Bump, Apache Kafka also uses hardware-accelerated CRC32-c which is missed in PHP
 [2019-03-04 04:29 UTC]
The following pull request has been associated:

Patch Name: Fix #71890: Add support for crc32c Castagnoli's polynomial.
On GitHub:  https://github.com/php/php-src/pull/3913
Patch:      https://github.com/php/php-src/pull/3913.patch
 [2019-03-11 09:19 UTC] nikic@php.net
Automatic comment on behalf of bramp@google.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c79ce48ddb2125a3d19723e0fbca1bd770bacab7
Log: Fix #71890: Add support for crc32c Castagnoli's polynomial.
 [2019-03-11 09:19 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC