http://en.m.wikipedia.org/wiki/Chunked_ ... r_encoding
It is a standard way of providing the content length one packet at a time without having to know the full length ahead of time. If you are dynamically generating content, there is not enough memory to store the whole string just to get its length.
I've seen a web server floating around with an example, but can't find it right now. I'll try to put it in my lhttpd port this weekend.