MCPcopy
hub / github.com/segmentio/kafka-go / writeCompactNullBytes

Method writeCompactNullBytes

protocol/encode.go:304–311  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

302}
303
304func (e *encoder) writeCompactNullBytes(b []byte) {
305 if b == nil {
306 e.writeUnsignedVarInt(0)
307 } else {
308 e.writeUnsignedVarInt(uint64(len(b)) + 1)
309 e.Write(b)
310 }
311}
312
313func (e *encoder) writeNullBytesFrom(b Bytes) error {
314 if b == nil {

Callers 1

Calls 2

writeUnsignedVarIntMethod · 0.95
WriteMethod · 0.95

Tested by

no test coverage detected