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

Method EncodeInt16

encode_number.go:71–73  ·  view source on GitHub ↗

EncodeInt16 encodes an int16 in 3 bytes preserving type of the number.

(n int16)

Source from the content-addressed store, hash-verified

69
70// EncodeInt16 encodes an int16 in 3 bytes preserving type of the number.
71func (e *Encoder) EncodeInt16(n int16) error {
72 return e.write2(msgpcode.Int16, uint16(n))
73}
74
75func (e *Encoder) encodeInt16Cond(n int16) error {
76 if e.flags&useCompactIntsFlag != 0 {

Callers 2

encodeInt16CondMethod · 0.95
EncodeIntMethod · 0.95

Calls 1

write2Method · 0.95

Tested by

no test coverage detected