This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The example in the spec relies on the existence of a "parser" that returns buffers that are full valid segments. Most of the code is not included. A much more simple example (with all the code included) will help developers to better understand the API and use it.
The expectation is that the web application is responsible for determining where the segment boundaries are. This is highly format & deployment dependent. This can be either done in javascript or with the help of backend servers. There is no generic solution that will work in a format agnostic way. The init/media segment abstractions are the best we can do. Lower level than that requires detailed knowledge of the specific format.
We could make the code sample format agnostic by not using a specific media type. However, I don't think this is what you're asking for. I think you're asking for the code for the functions not included but in a format agnostic way. As Aaron says, applications will not be able to ignore the format. Resolving NEEDSINFO. Please provide the example you're asking for and we can review adding it to the spec or into a separate primer document.