Skip to main content

open_decoded

Function open_decoded 

Source
pub fn open_decoded(path: &Path) -> Result<Box<dyn Read + Send>, Box<dyn Error>>
Expand description

The bytes of path as one stream, decompressed while it is read.

Compression is detected by magic bytes, as in read_file_contents, and every gzip member is read in order. The only memory used is the decoder’s own buffers, so it does not grow with the file.