For simple types:
Writes binary encoded value to buffer.
For Static arrays:
All array elements are written as-is, without terminator or length indicator.
For Dynamic arrays and strings:
First, an array length is written as 4-byte unsigned integer (regardless if 64 bit or not)
followed by array elements.
For C strings (const char*):
String is written with null terminator.
To write terminated strings use writeString instead or pass string wrapped in NullTerminated struct.
To write arrays without length use writeArray instead.
Writes value to buffer.
For simple types: Writes binary encoded value to buffer.
For Static arrays: All array elements are written as-is, without terminator or length indicator.
For Dynamic arrays and strings: First, an array length is written as 4-byte unsigned integer (regardless if 64 bit or not) followed by array elements.
For C strings (const char*): String is written with null terminator.
To write terminated strings use writeString instead or pass string wrapped in NullTerminated struct. To write arrays without length use writeArray instead.