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
My project takes in encoded proto strings (which were created from google's protobuf) and I just need a package that can decode them into javascript. Is this package's decoding process only for messages encoded by mapbox/pbf?
I ask because it works when I encode and then decode a message, like: let pbf = new pbf(); pbf.writeString('hi'); pbf.finish(); return pbf.readString();
but not when I just decode a message (this is embedded):
let pbf = new Pbf();
pbf.writeRawMessage(dataString);
pbf.finish();
//or just new Pbf(dataString)
const readFields = pbf.readFields(function(tag) {
const tagNeeded = tagArray[0];
if (tag === tagNeeded) {
if (tagArray.length == 1) {
return pbf.readFloat();
}
tagArray.splice(0, 1);
pbf.readMessage(readFields, {});
}, {});
}
The text was updated successfully, but these errors were encountered:
My project takes in encoded proto strings (which were created from google's protobuf) and I just need a package that can decode them into javascript. Is this package's decoding process only for messages encoded by mapbox/pbf?
I ask because it works when I encode and then decode a message, like:
let pbf = new pbf(); pbf.writeString('hi'); pbf.finish(); return pbf.readString();
but not when I just decode a message (this is embedded):
The text was updated successfully, but these errors were encountered: