MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / writeChunk

Method writeChunk

modules/crypt/ssl/ssl_stream.js:73–81  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

71 this.#bytes[this.#write++] = v >>> (n * 8);
72 }
73 writeChunk(a) {
74 const n = a.byteLength;
75 if (n <= 0)
76 return;
77 if (this.#write + n > this.#bytes.length)
78 this.morebuf(n);
79 this.#bytes.set((a instanceof Uint8Array) ? a : (new Uint8Array(a)), this.#write);
80 this.#write += n;
81 }
82 writeString(s) {
83 this.writeChunk(ArrayBuffer.fromString(s));
84 }

Callers 9

writeStringMethod · 0.95
calculateMacFunction · 0.95
aeadAdditionalDataFunction · 0.95
packetizeFunction · 0.95
packetizeFunction · 0.95
unpacketizeFunction · 0.95
p_hashFunction · 0.95
writeMethod · 0.45
handshakeDigestUpdateFunction · 0.45

Calls 2

morebufMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected