Encode a big-endian 16-bit integer into an Int8List.
static void encodeShort(final int value, final Int8List buf) { buf[0] = (0xff & (value >> 8)).toSigned(8); buf[1] = (0xff & (value)).toSigned(8); }