* 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)
| 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. |