We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protobuf.js version: v6.6.4
When deserializing sfixed64 values, the Long object returned contains data that is smaller by a factor of 2. I've compared v5.0.2 results with v6.6.4.
Long
v6.6.4
const pbEntity = pbRoot.lookup(schema); const buffer = Buffer.from(base64Data, 'base64'); const entity = pbEntity.decode(buffer).toObject({ bytes: String, enums: String, arrays: true });
v5.0.2
const entity = protoBufBuilder.build(schema).decode(base64Data).toRaw(true);
When I removed the zzDecode call, I got correct results:
zzDecode
function read_sfixed64_long() { return readFixed64.call(this).toLong(); }
instead of:
function read_sfixed64_long() { return readFixed64.call(this).zzDecode().toLong(); }
I think that the implementation might need to be identical to fixed64. If needed, I can write some code to repro the problem in isolation.
fixed64
The text was updated successfully, but these errors were encountered:
Fixed: sfixed64 is not zig-zag encoded, see #692
478ee51
Thank you for the quick fix. If I may ask, when are you planning on releasing v6.6.5 to npm?
Sorry, something went wrong.
Now on npm! Feel free to reopen if there are still any issues.
@dcodeIO, thank you!
edit: works like magic
No branches or pull requests
protobuf.js version: v6.6.4
When deserializing sfixed64 values, the
Long
object returned contains data that is smaller by a factor of 2.I've compared v5.0.2 results with v6.6.4.
Long
values is different by a factor of 2v6.6.4
v5.0.2
When I removed the
zzDecode
call, I got correct results:instead of:
I think that the implementation might need to be identical to
fixed64
.If needed, I can write some code to repro the problem in isolation.
The text was updated successfully, but these errors were encountered: