chunk
One piece of a larger piece of data delivered by a stream.
In more detail
Streams deliver data as a sequence of chunks, which may be bytes or strings. A text stream's chunks do not line up with words or lines, so code must join or split them itself.
Example
Node.js byte streams deliver chunks as Buffers.Related terms
- ReadableStream — A browser object that delivers data in chunks as it arrives, such as a fetch response.body, instead of all at once at the end.
- streaming — Sending a response in pieces as they become available instead of building the whole thing first.
- stream — Data that flows between a program and a source or destination piece by piece, rather than all at once.
- framing — The rule that marks where one message or record ends and the next begins in a stream of bytes.
- bundle — The files a build tool produces by combining an application's code and its libraries for the browser to download.
- code splitting — Dividing an app JavaScript into several files that load only when needed, instead of one big file up front.
- Network tab — The panel in browser developer tools that lists every file and request the page downloads, with sizes and timings.
Taught in
- The Fetch API: Streaming Responses, HTTP Caching And Keepalive — Frontend Architecture & Web Platform
- Buffer Encodings: UTF-8, Hex, Base64 & Slicing — Node.js Internals & Backend Services
- Stream Mechanics: Readable Streams & Flowing Modes — Node.js Internals & Backend Services
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services
- Code-Splitting with React.lazy: Dynamic Imports And Chunks — React 19 & Modern Component Architecture