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
#!/usr/bin/perl -w use Google::ProtocolBuffers; use File::Slurp qw(read_file write_file); Google::ProtocolBuffers->parse(" message TestMessage { required double tag1 = 1; } ", {create_accessors => 1 } ); my $enc = TestMessage->encode({ tag1 => 0, }); open my($fh), ">data.bin"; binmode $fh; print $fh $enc; close $fh; my $dec = read_file('data.bin', { binmode => ':raw' }); my $protoc = TestMessage->decode($dec); print $protoc->tag1;
And I get 0! Any number is rounded. But, when I try to use the protoc command, everything is as it should.
C:\Users\user\Desktop>protoc --decode_raw < data.bin 1: 0x0000000000000000
The text was updated successfully, but these errors were encountered:
No branches or pull requests
And I get 0! Any number is rounded.
But, when I try to use the protoc command, everything is as it should.
C:\Users\user\Desktop>protoc --decode_raw < data.bin 1: 0x0000000000000000
The text was updated successfully, but these errors were encountered: