STLV

January 19, 2019 ยท View on GitHub

Simple Type-Length-Value

Stlv is a binary encoding for type-length-value. The type is an unsigned 64 bit integer, the value can have a length of up to 2642^{64} - 1 bytes.

The binary encoding is defined as the concatenation of:

  • the type, encoded as a VarU64
  • the length of the value, encoded as a VarU64
  • the value itself

A canonic stlv uses canonic VarU64s.

That's it. There's nothing fancy here, it just needs to be defined somewhere.