Glossary · protocol

What is Chunked transfer (HTTP)?

Chunked transfer encoding is an HTTP feature that lets a server stream a response without knowing its total length up front. Each chunk has a length prefix; the stream ends with a zero-length chunk. Used for streaming video, progressive downloads, server-sent events. YouTube's `/stream` endpoint at VidPickr uses chunked transfer to pipe upstream bytes to users without buffering the full file.

Also called:chunked encoding · transfer-encoding chunked

Standard HTTP responses include Content-Length so the client knows how big the response is. Chunked transfer skips that — the server sends each chunk with its own size, terminating with a zero-size chunk signaling end. This lets servers stream data whose final length is unknowable in advance.

For VidPickr's /stream proxy: we receive bytes from YouTube's CDN and immediately forward them to the user. We don't know upfront how big the file will be (we could fetch HEAD to find out, but for live-CDN streaming the chunk-stream-as-we-go approach is simpler). The browser receives the bytes progressively and streams them to disk via the File System Access API.

Chunked encoding is also why progressive downloads work — you can start playing a video before fully downloading it because each chunk is independently parseable.

Common questions

Why doesn't chunked transfer support range requests?
It actually does — they're orthogonal features. A range request asks for byte 0-1000; the server can return that chunked or with a length. In practice, range requests usually return with Content-Length because the size is known by definition (start to end byte).

Related terms

VidPickr is a free, browser-based YouTube downloader. Every term in this glossary either describes how YouTube delivers video or why your downloads behave the way they do. Try the downloader →