MCPcopy
hub / github.com/SnapDrop/snapdrop / _onChunkRead

Method _onChunkRead

client/scripts/network.js:447–457  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

445 }
446
447 _onChunkRead(chunk) {
448 this._offset += chunk.byteLength;
449 this._partitionSize += chunk.byteLength;
450 this._onChunk(chunk);
451 if (this.isFileEnd()) return;
452 if (this._isPartitionEnd()) {
453 this._onPartitionEnd(this._offset);
454 return;
455 }
456 this._readChunk();
457 }
458
459 repeatPartition() {
460 this._offset -= this._partitionSize;

Callers 1

constructorMethod · 0.95

Calls 4

isFileEndMethod · 0.95
_isPartitionEndMethod · 0.95
_readChunkMethod · 0.95
_onPartitionEndMethod · 0.80

Tested by

no test coverage detected