Reading .pb file

1,783 views
Skip to first unread message

Vijay Miriyala

unread,
Feb 5, 2014, 9:49:04 PM2/5/14
to prot...@googlegroups.com
I am new to ProtoBuff file formats. I received a zip file which contains .pb file. I do not have .proto file. Is there a way to read the contents of the .pbp file in Java using the libraries?

Thank you

Feng Xiao

unread,
Feb 5, 2014, 10:44:37 PM2/5/14
to Vijay Miriyala, Protocol Buffers
You need a .proto file to parse protobuf messages because otherwise you won't be able to know what's in the data file.

On Wed, Feb 5, 2014 at 6:49 PM, Vijay Miriyala <vijaym...@gmail.com> wrote:
I am new to ProtoBuff file formats. I received a zip file which contains .pb file. I do not have .proto file. Is there a way to read the contents of the .pbp file in Java using the libraries?

Thank you

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Ilia Mirkin

unread,
Feb 5, 2014, 10:48:12 PM2/5/14
to Vijay Miriyala, prot...@googlegroups.com
You can use protoc --decode_raw to decode it. It will give you a
probable decoding of the message -- some specifics can't be known from
the encoding alone (e.g. string vs submessage, various types of ints,
etc are confusable).

You could implement this same functionality using the libraries
(protoc does it, so there must be a way!) but... it seems like it'd be
easier to create a proto file based on the sample for you to use and
work with that.
Reply all
Reply to author
Forward
0 new messages