[−][src]Function autocompress::create_or_stdout
pub fn create_or_stdout(
path: Option<impl AsRef<Path>>
) -> Result<Box<dyn Write>>
Create new writer from a file path. If a file path is None
, standard output is used. File format is suggested from file extension.
let mut writer = create_or_stdout(Some("create.txt.lz4"))?; writer.write_all(b"hello, world")?;