protodef
Version:
A simple yet powerful way to define binary protocols
32 lines (21 loc) • 512 B
Markdown
in one byte.
Example of value: `true` / `false`
Arguments: encoding
Represents a null terminated string. Similar to strings in C.
Assumes UTF-8 encoding by default
Example:
Example: A string length prefixed by a varint.
```json
[
"cstring", { "encoding": "utf-16" }
]
```
Example of value: `"my string"`
Arguments: None
Represents an empty value.
Example of value: `undefined` / `null`
Arguments: None
Represents a boolean, encoded