unpack: unserialize MessagePack format data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/unpack.R

Description

Unserialize MessagePack format data

Usage

1

Arguments

str

str is filename or array of raw data

Value

unserialized data from MessagePack format

Author(s)

Mikiya TANIZAWA 1970mix@gmail.com

See Also

pack, msgpack.writeResult

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
unpack(pack(c(1,2,3)))
#[1] 1 2 3
(data <- c(1,2,3))
#[1] 1 2 3
(d <- pack(data))
#[1] 93 01 02 03
msgpack.writeResult("test.txt", d)
unpack("test.txt")  # <= unserialize from binary file
#[1] 1 2 3
unpack(d) # <= unserialize from binary bits
#[1] 1 2 3

Example output

[1] 1 2 3
[1] 1 2 3
[1] 93 01 02 03
[1] 1 2 3
[1] 1 2 3

msgpackR documentation built on May 2, 2019, 12:01 p.m.