writeMapHeader method

void writeMapHeader(
  1. int count
)

Implementation

void writeMapHeader(int count) {
  if (count <= MessagePackRange.maxFixMapCount) {
    _bytesBuilder.addByte(MessagePackCode.minFixMap | count);
  } else if (count <= _maxUint16) {
    _bytesBuilder.addByte(MessagePackCode.map16);
    _writeBigEndianShort(count);
  } else {
    _bytesBuilder.addByte(MessagePackCode.map32);
    _writeBigEndianInt(count);
  }
}