MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / writeBytesField

Function writeBytesField

src/proto.js:86–89  ·  view source on GitHub ↗
(field, data)

Source from the content-addressed store, hash-verified

84
85/** Write a length-delimited bytes field (wire type 2). */
86export function writeBytesField(field, data) {
87 const buf = Buffer.isBuffer(data) ? data : Buffer.from(data);
88 return Buffer.concat([makeTag(field, 2), encodeVarint(buf.length), buf]);
89}
90
91/** Write an embedded message field (wire type 2). */
92export function writeMessageField(field, msgBuf) {

Callers 3

Calls 2

makeTagFunction · 0.85
encodeVarintFunction · 0.85

Tested by

no test coverage detected