Integer Numbers

CarbonDescriptionSizeMinMaxnull-ValueMarker
u8unsigned 8-bit int1 B028 - 2null or 28 - 1[c]
u16unsigned 16-bit int2 B0216 - 2null or216 - 1[d]
u32unsigned 32-bit int4 B0216 - 2null or216 - 1[i]
u64unsigned 64-bit int8 B0216 - 2null or216 - 1[l]
i8signed 8-bit int1 B−27 + 127 - 2null or-27[C]
i16signed 16-bit int2 B−215 + 1215 - 2null or-215[D]
i32signed 32-bit int4 B−231 + 1231 - 2null or-231[I]
i64signed 64-bit int8 B−263 + 1263 - 2null or-263[L]

Encoding as Field Value

Example

JSON snippet

[-42, 42, null]

A (compacted) Carbon file, which encodes the JSON array as array of one i8 and one u8 value.

[[] [c][-42] [C][42] [n] []]

Encoding as Column Value

Example

JSON snippet

[-42, 42, null]

A (compacted) Carbon column-8.

[C](3)(3) [-42][42][255]