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_temp::{Error, compression};
let (mut reader, format) = niffler_temp::from_path(file.path())?;
let mut contents = vec![];
reader.read_to_end(&mut contents);