I am trying to write my own Protobuf frame decoder and I’m basing it off:
I’m just wondering why it creates the new byte[5];
Doesn’t it just need to read the first byte to get the length. Why does it need the for loop?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because the length is represented as variable length field as described in here.