Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate CRC32A (ITU I.363.5) checksum? #17

Open
katatunix opened this issue Aug 13, 2019 · 3 comments
Open

How to calculate CRC32A (ITU I.363.5) checksum? #17

katatunix opened this issue Aug 13, 2019 · 3 comments

Comments

@katatunix
Copy link

Hi,

How to calculate CRC32A (ITU I.363.5) checksum by using this library?

@force-net
Copy link
Owner

It's impossible with this library.
There are a lot of CRC algorithms and library implements two most popular. I do not see anything special with this algorithm to implement it here.

@katatunix
Copy link
Author

Well, that because I'm porting the PHP hash_file function to C# https://www.php.net/manual/en/function.hash-file.php

I have verified that the output of the "crc32" is the ITU I.363.5 algorithm (a.k.a. AAL5 CRC - popularised by BZIP2 but also used in ATM transmissions - the algorithm is the same as that in POSIX 1003.2-1992 in Cksum but that stuffs the size into the CRC at the end for extra measure).

@force-net
Copy link
Owner

force-net commented Aug 13, 2019

CRC32A used in BZip2, it has same polynom, but without bit reversing. Current implementation is optimized for calculation with reversed bits, so, every part of code should be rewrited for CRC32A (in most parts I need just switch arrows from >> to << but there are more complex parts : ).
As I say, CRC32A are not popular, so, I do not plan to implement it (it can be, but in distant future...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants