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

Method EncodeSInt32

encoder.go:74–77  ·  view source on GitHub ↗

EncodeSInt32 writes a zigzag-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

72
73// EncodeSInt32 writes a zigzag-encoded 32-bit signed integer value to the buffer preceded by the varint-encoded tag key.
74func (e *Encoder) EncodeSInt32(tag int, v int32) {
75 e.offset += EncodeTag(e.p[e.offset:], tag, WireTypeVarint)
76 e.offset += EncodeZigZag32(e.p[e.offset:], v)
77}
78
79// EncodeSInt64 writes a zigzag-encoded 64-bit signed integer value to the buffer preceded by the varint-encoded tag key.
80func (e *Encoder) EncodeSInt64(tag int, v int64) {

Callers 15

FuzzNumbersFunction · 0.95
TestEncodeSInt32Function · 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
MarshalToMethod · 0.80

Calls 2

EncodeTagFunction · 0.85
EncodeZigZag32Function · 0.85

Tested by 2

FuzzNumbersFunction · 0.76
TestEncodeSInt32Function · 0.64