MCPcopy Create free account
hub / github.com/google/gapid / writeBlob

Method writeBlob

gapil/compiler/plugins/encoder/encoder.go:613–620  ·  view source on GitHub ↗

writeBlob writes calls inner with a new buffer. Once inner returns the buffer size is encoded as a varint. followed by the buffer itself.

(s *compiler.S, buf *codegen.Value, inner func(*codegen.Value))

Source from the content-addressed store, hash-verified

611// writeBlob writes calls inner with a new buffer. Once inner returns the buffer
612// size is encoded as a varint. followed by the buffer itself.
613func (e *encoder) writeBlob(s *compiler.S, buf *codegen.Value, inner func(*codegen.Value)) {
614 innerBuf, delBuf := e.newBuf(s)
615 defer delBuf()
616
617 inner(innerBuf)
618
619 e.writeBuffer(s, buf, innerBuf)
620}
621
622// writeBuffer writes the size of buffer src to dst as a varint to dst, and
623// then writes the src buffer data to dst.

Callers 2

encodeFieldMethod · 0.95
encodeValueMethod · 0.95

Calls 2

newBufMethod · 0.95
writeBufferMethod · 0.95

Tested by

no test coverage detected