base: Add wrapped protobuf input stream
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 7 Jan 2013 18:05:37 +0000 (13:05 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 7 Jan 2013 18:05:37 +0000 (13:05 -0500)
commit4afa6c4c3e7bb4ce0aea876120bf997e42353f67
tree4f691c3744e68ebd2e4e070d393194ee58883a5f
parentf456c7983ded455b006d25a9c5e17401f6c22dca
base: Add wrapped protobuf input stream

This patch adds support for inputting protobuf messages through a
ProtoInputStream which hides the internal streams used by the
library. The stream is created based on the name of an input file and
optionally includes decompression using gzip.

The input stream will start by getting a magic number from the file,
and also verify that it matches with the expected value. Once opened,
messages can be read incrementally from the stream, returning
true/false until an error occurs or the end of the file is reached.
src/proto/protoio.cc
src/proto/protoio.hh