Currently, only strings < 64k long have their length stored; longer strings have length 65535 as a marker, and are zero terminated. The short ones are zero terminated as well, for convenience. If the length could be stored for ALL strings, then the zeros would obviously be unnecessary, and strings could contain zero bytes. One way this could be done is to use one bit as a marker indicating that the length is really 4 bytes, i.e.: PREV(ptr, n) *((unsigned short *)str - n) STRLEN(x) ((tmp = PREV(str, 1)), tmp & 1 ? tmp/2 : (tmp + PREV(str, 2))/2) This, of course, requires a number of modifications throughout the driver :-)