Ⓐ

Variable Byte Coding

Assign Onward uses a variable byte encoding scheme
*vaguely related to Rice Coding
to represent data type codes, sizes of variable length data and integers which will not exceed 63 bits in magnitude. The scheme represents 64 bit signed integers using one to 10 bytes. The least significant bit of the first byte is the sign bit, set indicates negative. In the range 0-63, the coding scheme is the same as a single unsigned byte multiplied by 2. When a byte has the most significant bit set, that indicates that the following byte is also included in the code, and that seven more significant bits are stored in it.
*Currently, Assign Onward only recognizes variable byte codes up to 10 bytes in length, so a 1 in the most significant bit of the 10th byte is an error, unrecognized code. Also, 64 bit signed integers are used to hold the VBC values, so most of the bits in a 10th byte (if present) are ignored.
Each byte encodes 7 bits, with the least significant bits coming in the first byte.