Atlas binary1_beta2 codec specificationThe Atlas binary1_beta2 codec is a binary codec for the Atlas protocol. It defines type flags and specific binary encoding methods for each supported type. This particular version includes all basic Atlas primitives, but does not provide support for advanced features such as sized numeric types, user defined types, arrays, tunneling self encoded byte streams, or secondary transport layer connections such as UDP. |
||
A. Atlas types |
||
Atlas types are encoded as integers. Bit 6 is not anymore reserved for possible future use as an array type flag. Array types will be defined by user in binary2. The current type values and descriptions are as follows: |
||
Value | Description | |
0 | Possible future flag for user defined types | |
1 | Positive Integer | |
2 | Negative Integer | |
3 | Floating point encoded as two integers a and b where value = a * 2^b | |
4 | Floating point encoded as two integers a and b where value = a * 2^-b | |
5 | Floating point encoded as two integers a and b where value = -a * 2^b | |
6 | Floating point encoded as two integers a and b where value = -a * 2^-b | |
7 | Special floating point values encoded as an integer where 0 = NaN, 1 = +Inf, 2 = -Inf | |
8 | String with fixed length | |
9 | List with fixed length | |
10 | Map with fixed length | |
11 | String with unknown length | |
12 | List with unknown length | |
13 | Map with unknown length | |
B. Specific Encodings |
||
Most Atlas primitives are encoded as 'type' followed by 'value'. The Atlas 'type' is encoded as a positive integer. Specific encoding methods are as follows: |
||
|
date: 2001/03/01 00:35:32; author: blprice; state: Exp; binary1_beta.html added to forge/protocols/atlas/spec - based on irc discussion with Aloril