Skip to content Skip to sidebar Skip to footer

Can't Read Bytes From Protobuf Message In Javascript

I need to encode/decode bytes in a protobuf message using javascript. Strings work fine as shown, but when using bytes in the message definition I can see the data is contained in

Solution 1:

Explicitly setting by bytesUnencoded.data to Big Endian before readIString fixed the problem.

bytesUnencoded.data.BE();
console.log(bytesUnencoded.data.readIString());

Post a Comment for "Can't Read Bytes From Protobuf Message In Javascript"