Skip to main content

write_stream

Function write_stream 

Source
pub fn write_stream<R: Read>(
    name: &str,
    reader: R,
    config: &WriteConfig,
) -> Result<WriteArtifact, WriteError>
Expand description

Pack a single named stream into a .lim image.

For callers that pipe data from a network socket, pipe, or generator and don’t want to materialise the full content on disk before packing. The reader is consumed via FastCDC::chunk_reader which bounds internal buffering at max_chunk_size + 64 KiB.

The resulting image has a single root file with the given name (path-relative; safe to use / for subdirectories — they’re materialised in the metadata tree).

§Errors

Returns WriteError::Io on read failure or any writer-pipeline error.