msgpack_read: 'MsgPack' read

Description Usage Arguments Examples

View source: R/functions.r

Description

A helper function to de-serialize an object read from a file or a connection.

Usage

1
2
3
msgpack_read(file, simplify = F, mode = "auto", nbytes = 16777216)

msgpackRead(file, simplify = F, mode = "auto", nbytes = 16777216)

Arguments

file

A connection, or a string describing the file or pipe to write to, depending on the mode.

simplify

Passed to msgpack_unpack. Default: FALSE.

mode

One of "auto", "file", "gzip" or "pipe". If "auto", detects based on the file string (any space == pipe, ".gz" == gzip, file otherwise). Ignored if file is a connection.

nbytes

If reading from a pipe or gzip, how many bytes to read at a time. Default: 16777216

Examples

1
2
3
tmp <- tempfile(fileext=".gz")
msgpack_write(1:10, file=tmp)
x <- msgpack_read(tmp, simplify=TRUE)

Example output



RcppMsgPack documentation built on May 2, 2019, 3:44 a.m.