5 ms·
I don't understand this encoding method. If say, a dictionary starts with d and ends with e, how do you know with "d3:key5:valuee" if the value is "value" or "v
by ambicapter 10y ago
I don't understand this encoding method. If say, a dictionary starts with d and ends with e, how do you know with "d3:key5:valuee" if the value is "value" or "valu"?
- sigcode 10y agohttp://cr.yp.to/proto/netstrings.txt http://cr.yp.to/proto/netstrings.txt (1997)
- nemaar 10y agoThe length of the string is included, so you know where it ends.
- robteix 10y agoBecause the value is actually "5:value", which means it's 5 bytes long. The final 'e' indicates the end of the dictionary, not the value.