msgpack-arduino
msgpack-arduino copied to clipboard
Implicit functions question
Hi, and thanks for making this library available.
I notice that writeMapSize(Stream&, const uint8_t)
checks if the value exceeds 1 << 4
, and if not, encodes it as a map4 value.
However, I note that the other writeMapSize
overloads (uint16_t
and uint32_t
) don't perform this check. Why is this? Surely if the value can fit in a map4, then it should be encoded as such? Wouldn't that be more space-efficient?