Input and output streams are opened using a stream method. A stream method abstracts the stream operations required for reading or writing bytes from the source of those bytes. This makes it possible to read or write from data sources and storage mechanisms such as files, child processes, web servers, and in-memory lists of bytes. A stream method can also perform translations such as compression or encryption. For example, a stream method could allow a user to open a compressed file and read the uncompressed contents. Operating on streams allows operations to be performed on very large files that could otherwise not fit into physical memory.
The Wolfram System supplies stream methods for the most common needs, such as reading and writing from files, web servers, strings, and external commands. New stream methods can also be added to the Wolfram System.
When you open a stream for reading or writing, you can specify the stream method with the Method option, or the Wolfram System can choose the stream method automatically from the stream name.
You can add new input stream methods to the Wolfram System. This would be useful if you wanted to read from a new storage medium, or you wanted to transform the data as it is read, such as uncompressing a file.
You can add new output stream methods to the Wolfram System. This would be useful if you wanted to write to a new storage medium, or you wanted to transform the data as it is written, such as compressing a file.