A xz decoder, or decompressor.
This structure implements a
BufRead interface and takes a stream of
compressed data as input, providing the decompressed data when read from.
Creates a new decoder which will decompress data read from the given stream.
pub fn new_multi_decoder(r: R) -> XzDecoder<R>ⓘ[src]
Creates a new decoder which will decompress data read from the given input. All the concatenated xz streams from input will be consumed.
pub fn new_stream(r: R, stream: Stream) -> XzDecoder<R>ⓘ[src]
Creates a new decoder with a custom
Stream can be pre-configured for various checks, different
decompression options/tuning, etc.
Acquires a reference to the underlying stream
Acquires a mutable reference to the underlying stream
Note that mutation of the stream may result in surprising results if this encoder is continued to be used.
pub fn into_inner(self) -> R[src]
Consumes this decoder, returning the underlying reader.
Returns the number of bytes that the decompressor has consumed.
Note that this will likely be smaller than what the decompressor actually read from the underlying stream due to buffering.
Returns the number of bytes that the decompressor has produced.
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>1.36.0[src]
fn is_read_vectored(&self) -> bool[src]
unsafe fn initializer(&self) -> Initializer[src]
fn is_write_vectored(&self) -> bool[src]
impl<R> RefUnwindSafe for XzDecoder<R> where
impl<R> UnwindSafe for XzDecoder<R> where
type Error = Infallible
The type returned in the event of a conversion error.