MCPcopy
hub / github.com/golang/protobuf / EncodeVarint

Method EncodeVarint

proto/buffer.go:140–143  ·  view source on GitHub ↗

EncodeVarint appends an unsigned varint encoding to the buffer.

(v uint64)

Source from the content-addressed store, hash-verified

138
139// EncodeVarint appends an unsigned varint encoding to the buffer.
140func (b *Buffer) EncodeVarint(v uint64) error {
141 b.buf = protowire.AppendVarint(b.buf, v)
142 return nil
143}
144
145// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer.
146func (b *Buffer) EncodeZigzag32(v uint64) error {

Callers 4

EncodeZigzag32Method · 0.95
EncodeZigzag64Method · 0.95
TestNumericPrimitivesFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestNumericPrimitivesFunction · 0.64