Struct MultiGzDecoder
struct MultiGzDecoder<R>(_)
A gzip streaming decoder that decodes a gzip file that may have multiple members.
This structure implements a Read interface. When read from, it reads
compressed data from the underlying BufRead and provides the uncompressed data.
A gzip file consists of a series of members concatenated one after another. MultiGzDecoder decodes all members from the data and only returns Ok(0) when the underlying reader does. For a file, this reads to the end of the file.
To handle members separately, see [GzDecoder] or read more in the introduction.
Examples
use *;
use io;
# use Compression;
# use GzEncoder;
use MultiGzDecoder;
#
#
// Uncompresses a Gz Encoded vector of bytes and returns a string or error
// Here &[u8] implements BufRead
Implementations
impl<R> MultiGzDecoder<R>
fn header(self: &Self) -> Option<&GzHeader>Returns the current header associated with this stream, if it's valid
fn get_ref(self: &Self) -> &RAcquires a reference to the underlying reader.
fn get_mut(self: &mut Self) -> &mut RAcquires a mutable reference to the underlying stream.
Note that mutation of the stream may result in surprising results if this decoder is continued to be used.
fn into_inner(self: Self) -> RConsumes this decoder, returning the underlying reader.
impl<R: BufRead> MultiGzDecoder<R>
fn new(r: R) -> MultiGzDecoder<R>Creates a new decoder from the given reader, immediately parsing the (first) gzip header. If the gzip stream contains multiple members all will be decoded.
impl<R> Freeze for MultiGzDecoder<R>
impl<R> RefUnwindSafe for MultiGzDecoder<R>
impl<R> Send for MultiGzDecoder<R>
impl<R> Sync for MultiGzDecoder<R>
impl<R> Unpin for MultiGzDecoder<R>
impl<R> UnsafeUnpin for MultiGzDecoder<R>
impl<R> UnwindSafe for MultiGzDecoder<R>
impl<R: $crate::fmt::Debug> Debug for MultiGzDecoder<R>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<R: BufRead> Read for MultiGzDecoder<R>
fn read(self: &mut Self, into: &mut [u8]) -> Result<usize>
impl<T> Any for MultiGzDecoder<R>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for MultiGzDecoder<R>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for MultiGzDecoder<R>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for MultiGzDecoder<R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for MultiGzDecoder<R>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for MultiGzDecoder<R>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for MultiGzDecoder<R>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>