- .agent/, .claude/, .vscode/ 설정 파일 - design/ 디자인 리소스 - reports/, research/ 분석 문서 - testcase/ 테스트 케이스 문서 - db_sync_chandj.bat, sam.code-workspace Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
599 B
JavaScript
25 lines
599 B
JavaScript
"use strict";
|
|
|
|
var GenericWorker = require("./GenericWorker");
|
|
var crc32 = require("../crc32");
|
|
var utils = require("../utils");
|
|
|
|
/**
|
|
* A worker which calculate the crc32 of the data flowing through.
|
|
* @constructor
|
|
*/
|
|
function Crc32Probe() {
|
|
GenericWorker.call(this, "Crc32Probe");
|
|
this.withStreamInfo("crc32", 0);
|
|
}
|
|
utils.inherits(Crc32Probe, GenericWorker);
|
|
|
|
/**
|
|
* @see GenericWorker.processChunk
|
|
*/
|
|
Crc32Probe.prototype.processChunk = function (chunk) {
|
|
this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);
|
|
this.push(chunk);
|
|
};
|
|
module.exports = Crc32Probe;
|