Learn R Programming

RProtoBuf: 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)

Copy Link

Version

Install

install.packages('RProtoBuf')

Monthly Downloads

2,497

Version

0.4.28

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Dirk Eddelbuettel

Last Published

August 21st, 2026

Functions in RProtoBuf (0.4.28)

MethodDescriptor-class

Class "MethodDescriptor"
Next-methods

Obtains a chunk of data from the stream
ServiceDescriptor-class

Class "ServiceDescriptor"
Skip-methods

Skips a number of bytes
Message-class

Class "Message"
SetCloseOnDelete-methods

set the close on delete behavior
P

Protocol Buffer descriptor importer
RProtoBuf-package

R Interface to the Protocol Buffers API
ZeroCopyOutputStream-class

Virtual Class "ZeroCopyOutputStream"
ZeroCopyInputStream-class

Virtual Class "ZeroCopyInputStream"
bytesize-methods

The number of bytes taken by a message
add-methods

add elements of a repeated field of a message
containing_type-methods

Gets the message type descriptor that contains a descriptor
completion

Completion support for protocol buffer messages and descriptors
enum_type-methods

Extract an enum type descriptor for a nested type
descriptor-methods

Get the descriptor of a message
as.list.Message

Grab the protocol buffer message as an R list
enum_type_count-methods

The number of enum types
merge-methods

Merge two messages of the same type
fetch-methods

Fetch content of a repeated field
asMessage

coerce an object to a protobuf message
clear-methods

Clear a field or all fields of the message and set them to their default values
clone-methods

Clone protocol buffer messages
name

Name or full name of a descriptor
isInitialized-methods

Indicates if a protocol buffer message is initialized
is_extension-methods

Indicates if a field descriptor is an extension
serialize_pb

Serialize R object to Protocol Buffer Message.
set-methods

set a subset of values of a repeated field of a message
number-methods

Gets the declared tag number of a field
field-methods

Extract a field descriptor
readProtoFiles

protocol buffer descriptor importer
has-methods

Indicates if an object has the given field set
read-methods

Read a protocol buffer message from a connection
field_count-methods

The number of fields
readASCII-methods

read a message in ASCII format
size-methods

Size of a message field
fileDescriptor-methods

gets the file descriptor of an object
readJSON-methods

read a message in JSON format
type-methods

Gets the type or the C++ type of a field
nested_type-methods

Extract a message type descriptor for a nested type
nested_type_count-methods

The number of fields
with.Message

with and within methods for protocol buffer messages
sizegets

Set the size of a field
swap-methods

swap elements of a repeated field of a message
BackUp-methods

Backs up a number of bytes from a stream
ConnectionOutputStream-methods

Creates an ConnectionOutputStream
ArrayOutputStream-class

Class "ArrayOutputStream"
ConnectionInputStream-class

Class "ConnectionInputStream"
EnumDescriptor-class

Class "EnumDescriptor"
FileInputStream-methods

Creates an FileInputStream
Descriptor-class

Class "Descriptor"
FileInputStream-class

Class "FileInputStream"
GetErrno-methods

Get the error number for an I/O error
ConnectionOutputStream-class

Class "ConnectionOutputStream"
FileDescriptor-class

Class "FileDescriptor"
ByteCount-methods

The number of bytes read/written since the object was created
ArrayInputStream-class

Class "ArrayInputStream"
ArrayOutputStream-methods

Creates an ArrayOutputStream
FieldDescriptor-class

Class "FieldDescriptor"
EnumValueDescriptor-class

Class "EnumValueDescriptor"
ArrayInputStream-methods

Creates an ArrayInputStream
FileOutputStream-methods

Creates an FileOutputStream
ConnectionInputStream-methods

Creates an ConnectionInputStream
FileOutputStream-class

Class "FileOutputStream"