blob: 5b34cb9cb75a34f14a49074f06a752efd82a0133 [file] [log] [blame]
<table class="data-table"><tbody>
<tr><th>Type</th>
<th>Description</th>
</tr>
<tr><td>BOOLEAN</td><td>Represents a boolean value in a byte. Values 0 and 1 are used to represent false and true respectively. When reading a boolean value, any non-zero value is considered true.</td></tr>
<tr><td>INT8</td><td>Represents an integer between -2<sup>7</sup> and 2<sup>7</sup>-1 inclusive.</td></tr>
<tr><td>INT16</td><td>Represents an integer between -2<sup>15</sup> and 2<sup>15</sup>-1 inclusive. The values are encoded using two bytes in network byte order (big-endian).</td></tr>
<tr><td>INT32</td><td>Represents an integer between -2<sup>31</sup> and 2<sup>31</sup>-1 inclusive. The values are encoded using four bytes in network byte order (big-endian).</td></tr>
<tr><td>INT64</td><td>Represents an integer between -2<sup>63</sup> and 2<sup>63</sup>-1 inclusive. The values are encoded using eight bytes in network byte order (big-endian).</td></tr>
<tr><td>UINT32</td><td>Represents an integer between 0 and 2<sup>32</sup>-1 inclusive. The values are encoded using four bytes in network byte order (big-endian).</td></tr>
<tr><td>VARINT</td><td>Represents an integer between -2<sup>31</sup> and 2<sup>31</sup>-1 inclusive. Encoding follows the variable-length zig-zag encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>.</td></tr>
<tr><td>VARLONG</td><td>Represents an integer between -2<sup>63</sup> and 2<sup>63</sup>-1 inclusive. Encoding follows the variable-length zig-zag encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>.</td></tr>
<tr><td>STRING</td><td>Represents a sequence of characters. First the length N is given as an INT16. Then N bytes follow which are the UTF-8 encoding of the character sequence. Length must not be negative.</td></tr>
<tr><td>NULLABLE_STRING</td><td>Represents a sequence of characters or null. For non-null strings, first the length N is given as an INT16. Then N bytes follow which are the UTF-8 encoding of the character sequence. A null value is encoded with length of -1 and there are no following bytes.</td></tr>
<tr><td>BYTES</td><td>Represents a raw sequence of bytes. First the length N is given as an INT32. Then N bytes follow.</td></tr>
<tr><td>NULLABLE_BYTES</td><td>Represents a raw sequence of bytes or null. For non-null values, first the length N is given as an INT32. Then N bytes follow. A null value is encoded with length of -1 and there are no following bytes.</td></tr>
<tr><td>RECORDS</td><td>Represents a sequence of Kafka records as NULLABLE_BYTES. For a detailed description of records see <a href="/documentation/#messageformat">Message Sets</a>.</td></tr>
<tr><td>ARRAY</td><td>Represents a sequence of objects of a given type T. Type T can be either a primitive type (e.g. STRING) or a structure. First, the length N is given as an INT32. Then N instances of type T follow. A null array is represented with a length of -1. In protocol documentation an array of T instances is referred to as [T].</td></tr>
</table>