Re: Deserializing a message for which I don't have the .proto (in Java)

2009-06-24 Thread Toph
No. Again, this requires knowing the proto definition. There's no way to distinguish between packed arrays and byte blobs given only the encoded message. So if I know that a given byte blob is actually a packed array, how can I decode it without having a precompiled proto definition? The

Deserializing a message for which I don't have the .proto (in Java)

2009-06-23 Thread Toph
Hi folks, I understand that protocol buffers messages are not fully self- describing. However, the message contains the field number, wire type, and value, right? In Java, how can I take a byte[] (array of bytes) that represents a message and deserialize it into a list of tuples that contain

Re: Deserializing a message for which I don't have the .proto (in Java)

2009-06-23 Thread Kenton Varda
You can use UnknownFieldSet, but be warned that the interface for that class is likely to change in a future version (because the current design is somewhat inefficient). If you just want to print the contents, you should be fine -- just parse into an UnknownFieldSet and then call its toString()