MCPcopy Create free account
hub / github.com/mapbox/pbf / writeBytes

Method writeBytes

index.js:360–366  ·  view source on GitHub ↗

@param {Uint8Array} buffer

(buffer)

Source from the content-addressed store, hash-verified

358
359 /** @param {Uint8Array} buffer */
360 writeBytes(buffer) {
361 const len = buffer.length;
362 this.writeVarint(len);
363 this.realloc(len);
364 this.buf.set(buffer, this.pos);
365 this.pos += len;
366 }
367
368 /**
369 * @template T

Callers 2

writeBytesFieldMethod · 0.95
pbf.test.jsFile · 0.80

Calls 2

writeVarintMethod · 0.95
reallocMethod · 0.95

Tested by

no test coverage detected