title: Is there a portable Binary-serialisation schema in FlatBuffers/Protobuf that supports arbitrary 24bit signed integer definitions?
body: <p>We are sending data over UART Serial at a high data rate so data size is important. The most optimal format is Int24 for our data which may be simplified as a C bit-field struct (GCC compiler) under C/C++ to be perfectly optimal:</p>
  
  <pre><code>#pragma pack(push, 1)
  struct Int24
  {
      int32_t value : 24;
  };
  #pragma pack(pop)
  
  typedef std::array&lt;Int24,32&gt; ArrayOfInt24;
  </code></pre>
  
  <p>This data is packaged with other data and shared among devices and cloud infrastructures. Basically we need to have a binary serialization which is sent between devices of different architecture and programming languages. We would like to use a Schema based Binary serialisation such as ProtoBuffers or FlatBuffers to avoid the client codes needing to handle the respective bit-shifting and recovery of the twos-complement sign bit handling themselves. i.e. Reading the 24-bit value in a non-C language requires the following:</p>
  
  <pre><code>bool isSigned = (_b2 &amp; (byte)0x80) != 0; // Sign extend negative quantities 
  int32_t value = _b0 | (_b1 &lt;&lt; 8) | (_b2 &lt;&lt; 16) | (isSigned ? 0xFF : 0x00) &lt;&lt; 24;
  </code></pre>
  
  <p>If not already existing which (if any) existing Binary Serialisation library could be modified easily to extend support to this as we would be willing to add to any open-source project in this respect.</p>