protobuf

Protocol Buffers
Download

protobuf Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • The protobuf developers
  • Publisher web site:
  • http://code.google.com/p/protobuf/

protobuf Tags


protobuf Description

Protocol Buffers Protocol Buffers are Google's data interchange format.Quick Example:You write a .proto file like this:message Person { required int32 id = 1; required string name = 2; optional string email = 3;}Then you compile it with protoc, the protocol buffer compiler, to produce code in C++, Java, or Python.Then, if you are using C++, you use that code like this:Person person;person.set_id(123);person.set_name("Bob");person.set_email("bob@example.com");fstream out("person.pb", ios::out | ios::binary | ios::trunc);person.SerializeToOstream(&out);out.close();Or like this:Person person;fstream in("person.pb", ios::in | ios::binary);if (!person.ParseFromIstream(&in)) { cerr Requirements: · Python


protobuf Related Software