Stream
creates a process that uses
stream
(see
sys-read(2))
to stream data in chunks of at most
bufsize
bytes (default:
Sys->ATOMICIO,
or 8192 bytes) from
file1
to the standard output.
If
file2
is provided,
the two files are instead cross-connected by two streaming processes:
one process streams data from
file1
to
file2,
and the other streams data from
file2
to
file1.
In all cases,
stream
writes data to the destination file in full buffers of
bufsize
bytes.
Stream
waits for all streaming processes to stop before returning,
unless the
-a
(asynchronous) option is given, which causes it to
return after spawning the streamers.