-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Hi maintainers! I'm a big fan of the simplicity of this package, and I've been using it for years in my software.
It's come to my attention in thejoshwolfe/yazl#82 that node now has a builtin native crc32 API in the zlib package. It looks like the two implementations agree on the math, although the type semantics of the APIs are of course subtly different:
console.log(require("node:zlib").crc32("hello")); // 907060870
console.log(require("buffer-crc32").unsigned("hello")); // 907060870Would you consider adding a special case for using the native implementation when it's available and falling back to the js implementation otherwise? If that doesn't seem like it makes sense to include in this package, I'll look into doing it in my own code.
If you are interested, would you mind if I opened a PR? (Also, are you interested in a PR that upgrades the tap dependency? It looks like there's a lot of security vulnerabilities in the 6 year old version used in this package.)