RProtoBuf v0.4.11

0

Monthly downloads

0th

Percentile

R Interface to the 'Protocol Buffers' 'API' (Version 2 or 3)

Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal 'RPC' protocols and file formats. Additional documentation is available in two included vignettes one of which corresponds to our 'JSS' paper (2016, <doi:10.18637/jss.v071.i02>. Either version 2 or 3 of the 'Protocol Buffers' 'API' is supported.

Readme

RProtoBuf Build Status License CRAN Downloads

R Interface to Google Protocol Buffers

What are Protocol Buffers?

A serialization format developed by Google and used widely within Google, and by numerous other projects. Quoting from the official website:

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

Protocol Buffers natively support C++, C#, Go, Java and Python. Many other languages are supported via contributed extensions. This package adds support for R.

Installation

You can either install from source via this repo, or install the CRAN package the usual way from R via

install.packages("RProtoBuf")

but do make sure you have the system requirements covered when building from source.

Under Debian/Ubuntu you may need

sudo apt-get install protobuf-compiler libprotobuf-dev libprotoc-dev

with similar commands on other operating systems or distributions.

Documentation

The package contains two pdf vignettes; the second one corresponds to our JSS paper.

Authors

Romain Francois, Dirk Eddelbuettel, Murray Stokely and Jeroen Ooms

License

GPL (>= 2)

Functions in RProtoBuf

Name Description
ConnectionInputStream-class Class "ConnectionInputStream"
ConnectionInputStream-methods Creates an ConnectionInputStream
ArrayInputStream-class Class "ArrayInputStream"
ArrayInputStream-methods Creates an ArrayInputStream
BackUp-methods Backs up a number of bytes from a stream
ByteCount-methods The number of bytes read/written since the object was created
ConnectionOutputStream-class Class "ConnectionOutputStream"
ConnectionOutputStream-methods Creates an ConnectionOutputStream
ArrayOutputStream-class Class "ArrayOutputStream"
ArrayOutputStream-methods Creates an ArrayOutputStream
FileOutputStream-methods Creates an FileOutputStream
GetErrno-methods Get the error number for an I/O error
Message-class Class "Message"
MethodDescriptor-class Class "MethodDescriptor"
FileDescriptor-class Class "FileDescriptor"
FileInputStream-class Class "FileInputStream"
ServiceDescriptor-class Class "ServiceDescriptor"
SetCloseOnDelete-methods set the close on delete behavior
asMessage coerce an object to a protobuf message
EnumValueDescriptor-class Class "EnumValueDescriptor"
FieldDescriptor-class Class "FieldDescriptor"
Skip-methods Skips a number of bytes
ZeroCopyInputStream-class Virtual Class "ZeroCopyInputStream"
containing_type-methods Gets the message type descriptor that contains a descriptor
descriptor-methods Get the descriptor of a message
isInitialized-methods Indicates if a protocol buffer message is initialized
is_extension-methods Indicates if a field descriptor is an extension
Descriptor-class Class "Descriptor"
EnumDescriptor-class Class "EnumDescriptor"
RProtoBuf-package R Interface to the Protocol Buffers API
RpcHTTP-class Class "RpcHTTP"
ZeroCopyOutputStream-class Virtual Class "ZeroCopyOutputStream"
add-methods add elements of a repeated field of a message
enum_type-methods Extract an enum type descriptor for a nested type
as.list.Message Grab the protocol buffer message as an R list
has-methods Indicates if an object has the given field set
invoke-methods invoke a protobuf rpc method
label-methods Gets the label of a field
nested_type_count-methods The number of fields
number-methods Gets the declared tag number of a field
clone-methods Clone protocol buffer messages
completion Completion support for protocol buffer messages and descriptors
field_count-methods The number of fields
fileDescriptor-methods gets the file descriptor of an object
name Name or full name of a descriptor
nested_type-methods Extract a message type descriptor for a nested type
sizegets Set the size of a field
swap-methods swap elements of a repeated field of a message
enum_type_count-methods The number of enum types
read-methods Read a protocol buffer message from a connection
readASCII-methods read a message in ASCII format
set-methods set a subset of values of a repeated field of a message
merge-methods Merge two messages of the same type
type-methods Gets the type or the C++ type of a field
with.Message with and within methods for protocol buffer messages
size-methods Size of a message field
FileInputStream-methods Creates an FileInputStream
FileOutputStream-class Class "FileOutputStream"
Next-methods Obtains a chunk of data from the stream
P Protocol Buffer descriptor importer
bytesize-methods The number of bytes taken by a message
clear-methods Clear a field or all fields of the message and set them to their default values
fetch-methods Fetch content of a repeated field
field-methods Extract a field descriptor
readProtoFiles protocol buffer descriptor importer
serialize_pb Serialize R object to Protocol Buffer Message.
No Results!

Vignettes of RProtoBuf

Name
figures/HistogramTools.pdf
figures/fig-021.pdf
figures/fig-SER.pdf
figures/histogram-mapreduce-diag1.pdf
figures/protobuf-distributed-system-crop.pdf
inactive/Makefile.in
inactive/static-use.Rnw
proto/hist.pb
proto/int64.proto
RProtoBuf-intro.Rmd
RProtoBuf-paper.Rnw
RProtoBuf-paper.bib
RProtoBuf-quickref.Rmd
RProtoBuf-unitTests.Rnw
No Results!

Last month downloads

Details

Date 2017-10-03
LinkingTo Rcpp
VignetteBuilder knitr
SystemRequirements ProtoBuf libraries and compiler version 2.2.0 or later; version 3.0.0 or later is supported as well. On Debian/Ubuntu these can be installed as libprotoc-dev, libprotobuf-dev and protobuf-compiler, while on Fedora/CentOS protobuf-devel and protobuf-compiler are needed.
BugReports https://github.com/eddelbuettel/rprotobuf/issues
URL https://github.com/eddelbuettel/rprotobuf
License GPL (>= 2)
NeedsCompilation yes
Packaged 2017-10-03 11:23:00 UTC; edd
Repository CRAN
Date/Publication 2017-10-03 19:58:44 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/RProtoBuf)](http://www.rdocumentation.org/packages/RProtoBuf)