3 ms·
Aren't those just P-strings with a semicolon? https://en.wikipedia.org/wiki/String_%28computer_science%29#Length-prefixed https://en.wikipedia.org/wiki/String_
by davorb 11y ago
Aren't those just P-strings with a semicolon?
https://en.wikipedia.org/wiki/String_%28computer_science%29#Length-prefixed https://en.wikipedia.org/wiki/String_%28computer_science%29#...
- fazzone 11y agoPascal-style strings have the length stored in the first byte, so a string can only be 255 characters long. Netstrings have the length in text at the front of the string instead, so you need only preallocate a buffer of 20 characters to store the text representation of string lengths up to 2^64 bytes.