Quire

Stream (computing)

From Quire, the open reference·Sequence of data items available over time·2 min read
Redirected from Input stream
The standard streams for input, output, and error
The standard streams for input, output, and error Image: source and license

In computer science, a stream is a sequence of potentially unlimited data elements made available over time. A stream can be thought of as items on a conveyor belt being processed one at a time rather than in large batches. Streams are processed differently from batch data.

Normal functions cannot operate on streams as a whole because they have potentially unlimited data. Formally, streams are codata (potentially unlimited), not data (which is finite).

Functions that operate on a stream producing another stream are known as filters and can be connected in pipelines in a manner analogous to function composition. Filters may operate on one item of a stream at a time or may base an item of output on multiple items of input, such as a moving average.

Examples#edit

The term stream is used in a number of similar ways:

Applications#edit

Streams can be used as the underlying data type for channels in interprocess communication.

Other uses#edit

The term stream is also applied to file system forks, where multiple sets of data are associated with a single filename. Most often, there is one main stream that makes up the normal file data, while additional streams contain metadata. Here, stream is used to indicate variable-size data, as opposed to fixed-size metadata such as extended attributes, but differs from stream as used otherwise, meaning, data available over time, potentially infinite.

See also#edit

References#edit

  1. ^ Dahl, Ole-Johan; Myhrhaug, Bjørn; Nygaard, Kristen (1970). Common Base Language (PDF) (Report). Norwegian Computing Center. Archived from the original on 2024-09-19. Retrieved 20 August 2025.
  2. ^ SRFI 41: Streams

This article is mirrored from “Stream (computing)” on English Wikipedia, revision 1364077682, written by Wikipedia's contributors and licensed CC BY-SA 4.0. Editing it here creates a Quire copy with its own history.

Synced with Wikipedia revision 1364077682 · just now