MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / EncodeInt32

Method EncodeInt32

encode_number.go:83–85  ·  view source on GitHub ↗

EncodeInt32 encodes an int32 in 5 bytes preserving type of the number.

(n int32)

Source from the content-addressed store, hash-verified

81
82// EncodeInt32 encodes an int32 in 5 bytes preserving type of the number.
83func (e *Encoder) EncodeInt32(n int32) error {
84 return e.write4(msgpcode.Int32, uint32(n))
85}
86
87func (e *Encoder) encodeInt32Cond(n int32) error {
88 if e.flags&useCompactIntsFlag != 0 {

Callers 2

encodeInt32CondMethod · 0.95
EncodeIntMethod · 0.95

Calls 1

write4Method · 0.95

Tested by

no test coverage detected