Function gix_archive::write_stream
source · pub fn write_stream<NextFn>(
stream: &mut Stream,
next_entry: NextFn,
out: impl Write,
opts: Options,
) -> Result<(), Error>
Expand description
Write all stream entries in stream
as provided by next_entry(stream)
to out
configured according to opts
which
also includes the streaming format.
§Performance
- The caller should be sure
out
is fast enough. If in doubt, wrap instd::io::BufWriter
. - Further, big files aren’t suitable for archival into
tar
archives as they require the size of the stream to be known prior to writing the header of each entry.