Module buffer

Library used to buffer I/O streams and for some I/O stream utilities

Functions

from (handle) Create a buffered stream from the given unbuffered stream
fromString (str) Returns an unbuffered stream that is backed by a string (in variable stream.data)
pipedStreams ([unbuffered=false]) Return a set of stream that are piped to each other.


Functions

from (handle)
Create a buffered stream from the given unbuffered stream

Parameters:

  • handle stream unbuffered stream

Returns:

    stream Buffered stream
fromString (str)
Returns an unbuffered stream that is backed by a string (in variable stream.data)

Parameters:

  • str string The string from which to read or write

Returns:

    stream String stream
pipedStreams ([unbuffered=false])
Return a set of stream that are piped to each other. This is the equivalent of a pipe library on other operating systems.

Parameters:

  • unbuffered bool Whether the streams should be unbuffered or buffered (default false)

Returns:

    {stream,stream} The piped input and output stream
generated by LDoc 1.4.6 Last updated 2021-12-27 19:58:59