It's just the standard IEEE 64-bit double encoding...

>>> struct.pack('d', 1.0)
'\x00\x00\x00\x00\x00\x00\xf0?'

[and of course ? == 0x3F]

On Mon, Sep 2, 2013 at 11:23 AM, Sébastien Muscat <seb.mus...@gmail.com> wrote:
> Hi,
>
> I'm new with protocol buiffer and I try to understand the double encoding.
>
> I try to encode 1 and the result value is :
>
> 09 00 00 00 00 00 00 F0 3F
>
> I understand that 09 is tag and wire type and the next 8 bytes are the value
> 1 encoded.
>
> But how 1 is encoded into F0 3F ?
>
> thanks for your answers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to