MCPcopy Create free account
hub / github.com/adobe/react-spectrum / crc32

Function crc32

packages/dev/s2-docs/src/zip.tsx:22–28  ·  view source on GitHub ↗
(arr: Uint8Array)

Source from the content-addressed store, hash-verified

20})();
21
22function crc32(arr: Uint8Array) {
23 let crc = -1;
24 for (let i = 0; i < arr.length; i++) {
25 crc = (crc >>> 8) ^ CRC32_TABLE[(crc ^ arr[i]) & 0xff];
26 }
27 return (crc ^ -1) >>> 0;
28}
29
30function putUint32s(arr: Uint8Array, offset: number, ...values: number[]) {
31 let dv = new DataView(arr.buffer);

Callers 1

zipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected