Type int8
Caution
If a value passed to .encode()
is outside the int8 range, an error will be thrown.
Information
- Used to describe integers from -128 to 127.
- Requires 1 bytes for storage.
- Use
number
for assignment.
Usage Example
import { Serializer, t } from "encodexx"
const serializer = new Serializer({ height: t.int8, grayscale: t.int8, lives: [t.int8]})
serializer.encode({ height: -50, grayscale: 127, lives: [12, 93, -1, 39]})