4 ms·
Another string length O(1) encoding format like Pascal strings that were len (unsigned byte) + data. Limited to 255 characters however. Dollar, NUL, and other
by burnt-resistor 3mo ago
Another string length O(1) encoding format like Pascal strings that were len (unsigned byte) + data. Limited to 255 characters however.
Dollar, NUL, and other terminated strings, by contrast, are string length O(N).
- cowboylowrez 3mo agofast cgi has a good one, length then binary follows, if the length is 127 or less, the length is contained within one byte, if not the length is contained in 4 bytes, then the data follows. Midi has a similar scheme for representing some numbers, the high order bit denotes if there's another byte of the number following or something like that lol
- repiret 3mo agostrlen for netstring is O(log n).