Write the header for an application-specific extension of len data bytes

After writing the header, clients should write the data bytes.

Require: len >= 0 and <= 0xFFFF

Property definitions

msgpack :: write $ Writer :: write_msgpack_ext16
	# Write the header for an application-specific extension of `len` data bytes
	#
	# After writing the header, clients should write the data bytes.
	#
	# Require: `len >= 0 and <= 0xFFFF`
	fun write_msgpack_ext16(typ, len: Int)
	do
		assert len >= 0 and len <= 0xFFFF
		write_byte 0xC8
		write_bytes len.to_bytes(n_bytes=2)
		write_byte typ
	end
lib/msgpack/write.nit:506,2--517,4