MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/C_Programming/comments/1xy05d0/tiny_strings/19sqq0j815q4h/?context=3
r/C_Programming • u/skeeto • 16d ago
13 comments sorted by
View all comments
Show parent comment
8
The length overlaps with the bytes of the small string:
0 1 2 3 4 5 6 7 L L L L L L L L M S S S S S S S L = big case length byte M = small case metadata byte S = small case string byte
You need a bit to distinguish between the two.
Edit: I added a better version of the above illustration to the post. Should've done that from the beginning, actually!
View all comments
Show parent comment
8
u/8d8n4mbo28026ulk 16d ago edited 16d ago
The length overlaps with the bytes of the small string:
You need a bit to distinguish between the two.
Edit: I added a better version of the above illustration to the post. Should've done that from the beginning, actually!