MCPcopy Create free account
hub / github.com/apache/fory / WriteBinary

Method WriteBinary

go/fory/buffer.go:291–298  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

289}
290
291func (b *ByteBuffer) WriteBinary(p []byte) {
292 b.grow(len(p))
293 l := copy(b.data[b.writerIndex:], p)
294 if l != len(p) {
295 panic(fmt.Errorf("should write %d bytes, but written %d bytes", len(p), l))
296 }
297 b.writerIndex += len(p)
298}
299
300// ReadBool reads a bool and sets error on bounds violation
301func (b *ByteBuffer) ReadBool(err *Error) bool {

Calls 1

growMethod · 0.95