core :: Writer :: write_msgpack_bin
data
in the shortest possible MessagePack bin formatRequire: data.length <= 0xFFFF_FFFF
# Write `data` in the shortest possible MessagePack _bin_ format
#
# Require: `data.length <= 0xFFFF_FFFF`
fun write_msgpack_bin(data: Bytes)
do
var len = data.length
if len <= 0xFF then
write_msgpack_bin8 data
else if len <= 0xFFFF then
write_msgpack_bin16 data
else if len <= 0xFFFF_FFFF then
write_msgpack_bin32 data
else abort
end
lib/msgpack/write.nit:234,2--247,4