In html, I know there is a chunked encoding. Anyone knows its advantage?
It's not part of HTML - it's part of HTTP.
It means that you can start writing the content to the output stream before you know exactly how large the output is going to be. This means you don't have to buffer the whole page (or whatever you're delivering) in memory or on disk before you start transmitting.