SimpleHandle is a Handle for a very simple encoding format.

simple is a simplistic codec similar to binc, but not as compact.

- Encoding of a value is always preceeded by the descriptor byte (bd)
- True, false, nil are encoded fully in 1 byte (the descriptor)
- Integers (intXXX, uintXXX) are encoded in 1, 2, 4 or 8 bytes (plus a descriptor byte).
  There are positive (uintXXX and intXXX >= 0) and negative (intXXX < 0) integers.
- Floats are encoded in 4 or 8 bytes (plus a descriptor byte)
- Lenght of containers (strings, bytes, array, map, extensions)
  are encoded in 0, 1, 2, 4 or 8 bytes.
  Zero-length containers have no length encoded.
  For others, the number of bytes is given by pow(2, bd%3)
- maps are encoded as [bd] [length] [[key][value]]...
- arrays are encoded as [bd] [length] [value]...
- extensions are encoded as [bd] [length] [tag] [byte]...
- strings/bytearrays are encoded as [bd] [length] [byte]...

The full spec will be published soon.

SimpleHandle is referenced in 0 repositories