You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reading many messages from a file. The buffer read from the file looks like :
<0a a7 23 08 97 f8 ce ab 06 ...
It starts with "0a" which, from my understanding, indicates that the buffer is length delimited. Then comes the size of the message, then the actuel message, and repeat.
My problem here is that the decodeDelimited method seems to use the first byte 0a as the length of the message instead of skipping it, and throw an error.
Should I manually skip this byte before decoding each message ? This works, but I'm not familiar with Protobuf and I may be misunderstanding something.
protobuf.js version: <7.2.5>
Hello,
I am reading many messages from a file. The buffer read from the file looks like :
<0a a7 23 08 97 f8 ce ab 06 ...
It starts with "0a" which, from my understanding, indicates that the buffer is length delimited. Then comes the size of the message, then the actuel message, and repeat.
My problem here is that the decodeDelimited method seems to use the first byte 0a as the length of the message instead of skipping it, and throw an error.
Should I manually skip this byte before decoding each message ? This works, but I'm not familiar with Protobuf and I may be misunderstanding something.
Here is the code I'm using to decode
Any insight about this ? Am I doing something wrong or should I really do that this way ?
The text was updated successfully, but these errors were encountered: