[−][src]Function autocompress::open
pub fn open(path: impl AsRef<Path>) -> Result<Decoder<BufReader<File>>>
Open new reader from file path. File format is suggested from magic bytes and file extension.
let mut buffer = Vec::new(); open("testfiles/plain.txt.xz")?.read_to_end(&mut buffer)?; assert_eq!(buffer, b"ABCDEFG\r\n1234567");