MCPcopy
hub / github.com/gchq/CyberChef / moveForwardsBy

Method moveForwardsBy

src/core/lib/Stream.mjs:261–267  ·  view source on GitHub ↗

* Move forwards through the stream by the specified number of bytes. * * @param {number} numBytes

(numBytes)

Source from the content-addressed store, hash-verified

259 * @param {number} numBytes
260 */
261 moveForwardsBy(numBytes) {
262 const pos = this.position + numBytes;
263 if (pos < 0 || pos > this.length)
264 throw new Error("Cannot move to position " + pos + " in stream. Out of bounds.");
265 this.position = pos;
266 this.bitPos = 0;
267 }
268
269 /**
270 * Move backwards through the stream by the specified number of bytes.

Callers 15

extractGIFFunction · 0.95
extractMZPEFunction · 0.95
extractPDFFunction · 0.95
extractZIPFunction · 0.95
extractTARFunction · 0.95
extractPNGFunction · 0.95
extractWEBPFunction · 0.95
extractBMPFunction · 0.95
extractICOFunction · 0.95
extractMP3Function · 0.95
extractFLVFunction · 0.95
extractPListXMLFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected