且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法从 javascript 中的 protobuf 消息读取字节

更新时间:2023-02-17 13:24:50

readIString 解决问题之前,通过 bytesUnencoded.data 显式设置为 Big Endian.

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

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