Skip to content

multiple Protocol Buffers in a single binary file: forked from google/or-tools

Notifications You must be signed in to change notification settings

xeno14/recordio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recordio

recordio provides a interface to read/write multiple Protocol Buffers messages from/to a single binary file.

Forked from google/or-tools

Usage

See test.cc for an example

Write

Person person;    // a protobuf message

std::ofstream ofs("example.recordio", std::ios::binary);
recordio::RecordWriter writer(&ofs);

writer.WriteProtocolMessage(person);
writer.Close()

Read

std::ifstream ifs("example.recordio", std::ios::binary);
recordio::RecordReader reader(&ifs);

Person person;
while (reader.ReadProtocolMessage(&person)) {
  // do something
}
reader.Close();

Dependencies

  • zlib
  • protocol buffer

License

Apache License, Version 2.0 (see the codes for more details)

About

multiple Protocol Buffers in a single binary file: forked from google/or-tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published