Once got parsed type, how to project back to original bytes per each field?
12 views
Skip to first unread message
Bingo Zhao
unread,
Jan 30, 2020, 6:12:21 AM1/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
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
Say I've got a message proto defined as below:
message Msg{
optional int32 a;
optional string b;
optional bytes payload;
...
}
and got a bunch of bytes [0x.......] parsed as type Msg. I may get all fields contents from Msg object but I'd just want to project the index:length in original bytes which correlating to specified fields(payload field say). What I'm supposed to do achieving this?