Reader

Noun · Development

Definitions

  1. An interface or trait that abstracts reading bytes from an underlying source — files, sockets, buffers, or compressed streams — through a common read() method. Go's io.Reader, Rust's std::io::Read, and Java's java.io.Reader are canonical examples, enabling composable I/O where decompression, decryption, or buffering layers can be stacked transparently.

    In plain English: A standard way for code to read data from any source — a file, a network connection, or anything else — using the same interface.

    Example: "The parser accepts any io.Reader, so it works the same whether you pass it an HTTP response body, a file, or a gzip reader."

Related Terms