alexgorbatchev / crc

Blazingly fast CRC implementations for node.js and browser
MIT License
349 stars 72 forks source link

Nomenclature of CRC functions #12

Closed bminer closed 10 years ago

bminer commented 11 years ago

@alexgorbatchev - I ran a few of the CRC functions and came up with the following (as of the last commit affe249cacec42036386e9a370bc151e9f468037):

Checkout http://www.lammertbies.nl/comm/info/crc-calculation.html for more info.

alexgorbatchev commented 11 years ago

Hm... so it's all wrong essentially? :) I didn't anticipate this module getting any attention, but it feels like it could use some love. What do you think?

bminer commented 11 years ago

Nah, it's not all that bad. It's a great lib, really! I'd be glad to contribute via pull requests or whatever. Just let me know what you think.

alexgorbatchev commented 11 years ago

@bminer if you are still up for contributing proper function naming, I would really appreciate it!

It would have to be released as a major version, but i'm not quite sure how to handle the fact that crc16arc will become crc16

alexgorbatchev commented 10 years ago

@bminer, wanted to follow up with you on this. What do you think?

bminer commented 10 years ago

@alexgorbatchev - Sorry for not responding. I currently don't have any time to contribute to this lib, but I know that it's pretty widely used.

So, after doing some research about cyclic redundancy checks (CRCs), I've determined the following:

With all of that said, the node-crc library has incorrectly labelled a few of the CRC functions. I would recommend that you take a look at the catalogue to see what's what.

As far as changing the lib goes, I would consider the next release to be a major, breaking release. There will be some applications that have persistently stored the CRCs generated by this library, and changing the names of the CRC algorithms could have severe consequences for some users.

Anyway, I hope that helps. Please feel free to write back here with your comments, etc. Thanks again for such a great lib!

bminer commented 10 years ago

Also, I was scratching my head for a while trying to figure out what CCITT meant. As far as I can tell, it means "The ITU Telecommunication Standardization Sector," formerly called the International Telegraph and Telephone Consultative Committee (CCITT, from French: Comité Consultatif International Téléphonique et Télégraphique).

So, there you have it!

alexgorbatchev commented 10 years ago

full rewrite based on a Ruby Digest::CRC module.