netstrings
Netstrings are a simple encoding for transmitting strings over a network. Each netstring consists of a length prefix, a colon, the data, and a trailing comma. The length prefix is a base-10 integer indicating the number of bytes in the data. Netstrings are self-delimiting and unambiguous when read from a byte stream.
Format: <length>:<data>, for example 4:spam, encodes the ASCII string spam (4 bytes). 0:, encodes the empty string.
Parsing and streaming: Parsing proceeds by reading digits until a colon to obtain length, then reading exactly
Usage and advantages: Netstrings are simple to implement in most languages and require no escaping. They provide
Limitations: The length prefix is encoded in decimal, so there is an overhead that grows with message
History: Netstrings were introduced by Daniel J. Bernstein in the early 2000s as a compact, robust data-framing