MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / update

Method update

packages/alphatab/src/zip/Crc32.ts:48–53  ·  view source on GitHub ↗

* Update CRC data checksum based on a portion of a block of data * @param data The array containing the data to add * @param offset Range start for data (inclusive) * @param count The number of bytes to checksum starting from offset

(data: Uint8Array, offset: number, count: number)

Source from the content-addressed store, hash-verified

46 * @param count The number of bytes to checksum starting from offset
47 */
48 public update(data: Uint8Array, offset: number, count: number) {
49 for (let i = 0; i < count; i++) {
50 this._checkValue =
51 Crc32._crc32Lookup[(this._checkValue ^ data[offset + i]) & 0xff] ^ (this._checkValue >>> 8);
52 }
53 }
54
55 /**
56 * Resets the CRC data checksum as if no update was ever called.

Callers 1

_compressMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected