ecl
unread,Nov 20, 2009, 11:50:58 AM11/20/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
I have a protocol buffer where I'm encoding audio snippets, containing
a small header, and a few hundred kilobytes of (mono or stereo,
multiplexed or not) audio data, as bytes. However, due to the nature
of the intermittent communications, the message may get truncated at
some point, most probably past the header, but therefore truncating a
significant chunk of the audio bytes.
As even the initial part of the audio could be useful (if the
remaining bits gets lost) - is there a way to safely deserialize a
protocol buffer message where the end has been chopped off? I've
tested deserializing a message where the last byte was removed - this
causes an exception (using the Java API), and apparently no way to get
the partial message, and most importantly, the partial bytes.
Any ideas on how I could go to solve this problem?
Kind regards,
Ernest