[
https://issues.apache.org/jira/browse/THRIFT-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980838#comment-13980838
]
Jens Geyer commented on THRIFT-2457:
------------------------------------
Just to follow up on the type code thoughts:
A better type code would separate the two aspects *content* and *size*,
something like this:
{code}
bits: 0 101 0101
meaning: reserved ----+ | +------ content type
size
{code}
- {{size}} is a 3-bit number indicating the number of bytes to skip: 0, 1, 2,
4, 8, 16, BLOB (= 7 values, one bit combination left)
- BLOB is for values with variable size, such as {{string}} and {{binary}}.
The actual size is indicated in a protocol-dependent, well-defined way here.
- {{content}} is a 4-bit number indicating the content type of the field, e.g.
{{float}}, {{i32}}, {{bool}}, {{byte}}, etc.
- the reserved bit leaves room for future extensions of the type code
This allows for adding new types without breaking the skip mechanism for older
clients/servers.
> fbthrift float
> --------------
>
> Key: THRIFT-2457
> URL: https://issues.apache.org/jira/browse/THRIFT-2457
> Project: Thrift
> Issue Type: Sub-task
> Components: Build Process, C++ - Compiler, C++ - Library, Test Suite
> Reporter: Roger Meier
> Priority: Minor
> Fix For: 1.0
>
>
> I'm interested into the fbthrift FLOAT data type.
> Which languages are supported?
--
This message was sent by Atlassian JIRA
(v6.2#6252)