MCPcopy Create free account
hub / github.com/CrowdStrike/csproto / EncodeInt32

Method EncodeInt32

encoder.go:62–65  ·  view source on GitHub ↗

EncodeInt32 writes a varint-encoded 32-bit signed integer value to the buffer preceded by the varint-encoded tag key.

(tag int, v int32)

Source from the content-addressed store, hash-verified

60
61// EncodeInt32 writes a varint-encoded 32-bit signed integer value to the buffer preceded by the varint-encoded tag key.
62func (e *Encoder) EncodeInt32(tag int, v int32) {
63 e.offset += EncodeTag(e.p[e.offset:], tag, WireTypeVarint)
64 e.offset += EncodeVarint(e.p[e.offset:], uint64(v))
65}
66
67// EncodeInt64 writes a varint-encoded 64-bit signed integer value to the buffer preceded by the varint-encoded tag key.
68func (e *Encoder) EncodeInt64(tag int, v int64) {

Callers 15

MarshalToMethod · 0.95
FuzzNumbersFunction · 0.95
TestEncodeInt32Function · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80
MarshalToMethod · 0.80

Calls 2

EncodeTagFunction · 0.85
EncodeVarintFunction · 0.85

Tested by 3

MarshalToMethod · 0.76
FuzzNumbersFunction · 0.76
TestEncodeInt32Function · 0.64