UNPKG

@thewtex/vtk.js-esm

Version:

Visualization Toolkit for the Web

25 lines (21 loc) 654 B
import { G as GenericWorker_1 } from './GenericWorker.js'; import { c as crc32_1 } from '../crc32.js'; import { u as utils } from '../utils.js'; /** * A worker which calculate the crc32 of the data flowing through. * @constructor */ function Crc32Probe() { GenericWorker_1.call(this, "Crc32Probe"); this.withStreamInfo("crc32", 0); } utils.inherits(Crc32Probe, GenericWorker_1); /** * @see GenericWorker.processChunk */ Crc32Probe.prototype.processChunk = function (chunk) { this.streamInfo.crc32 = crc32_1(chunk.data, this.streamInfo.crc32 || 0); this.push(chunk); }; var Crc32Probe_1 = Crc32Probe; export { Crc32Probe_1 as C };