MCPcopy
hub / github.com/hoothin/UserScripts / crc32

Function crc32

Picviewer CE+/Picviewer CE+.user.js:506–516  ·  view source on GitHub ↗
(crc, buf, len, pos)

Source from the content-addressed store, hash-verified

504
505
506function crc32(crc, buf, len, pos) {
507 var t = crcTable, end = pos + len;
508
509 crc = crc ^ (-1);
510
511 for (var i = pos; i < end; i++ ) {
512 crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
513 }
514
515 return (crc ^ (-1)); // >>> 0;
516}
517
518// That's all for the pako functions.
519

Callers 5

generateZipPartsFunction · 0.70
read_bufFunction · 0.70
deflateFunction · 0.70
inflateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected