Function niffler::basic::from_path [−][src]
pub fn from_path<'a, P: AsRef<Path>>(
path: P
) -> Result<(Box<dyn Read + 'a>, Format), Error>
Expand description
Open a possibly compressed file and decompress it transparently.
use niffler::{Error, compression}; let (mut reader, format) = niffler::from_path(file.path())?; let mut contents = vec![]; reader.read_to_end(&mut contents);