msgpack_unpack {RcppMsgPack}R Documentation

'MsgPack' Unpack

Description

De-serialize a 'MsgPack' message. Array is converted into List. Map is converted into Map/Data.frame. Extension types are converted into raw vectors with EXT attribute. Integers, Floats, Strings, Raw and Nil are converted into Integer, Float, Character, Raw and NULL respectively.

Usage

msgpack_unpack(message, simplify = F)

msgpackUnpack(message, simplify = F)

Arguments

message

A raw vector containing the message.

simplify

Default false. Should the return object be simplified? This is generally faster and more memory efficient.

Value

The message pack object(s) converted into R types. If more than one object exists in the message, a list of class "msgpack_set" containing the objects is returned.

See Also

See examples/tests.r for more examples.

Examples

x <- msgpack_format(1:10)
x_packed <- msgpack_pack(x)
x_unpacked <- msgpack_unpack(x_packed)
x_simplified <- msgpack_simplify(x_unpacked)

[Package RcppMsgPack version 0.2.3 Index]