/// Returns the header of the ZLIB stream.
///
/// # Examples
/// ```
/// use libflate::zlib::CompressionLevel;
/// use libflate::non_blocking::zlib::Decoder;
///
/// let encoded_data = [120, 156, 243, 72, 205, 201, 201, 87, 8, 207, 47,
///                     202, 73, 81, 4, 0, 28, 73, 4, 62];
///
/// let mut decoder = Decoder::new(&encoded_data[..]);
/// assert_eq!(decoder.header().unwrap().compression_level(),
///            CompressionLevel::Default);
/// ```
Returns the header of the ZLIB stream.
Returns the header of the ZLIB stream .
pub fn header(&mut self) -> io::Result<&Header> {
        if let Some(ref header) = self.header {
            Ok(header)
        } else {
            let header = self
                .reader
                .bit_reader_mut()
                .transaction(|r| Header::read_from(r.as_inner_mut()))?;
            self.header = Some(header);
            self.header()
        }
    }
pub fn header ( & mut self ) -> io :: Result < & Header > { if let Some ( ref header ) = self . header { Ok ( header ) } else { let header = self . reader . bit_reader_mut ( ) . transaction ( | r | Header :: read_from ( r . as_inner_mut ( ) ) ) ? ; self . header = Some ( header ) ; self . header ( ) } }
Returns the header of the ZLIB stream.
Returns the header of the ZLIB stream .
&mut self
examples
```
use libflate::zlib::CompressionLevel;
use libflate::non_blocking::zlib::Decoder.



let mut decoder = Decoder::new(&encoded_data[..]);
assert_eq!(decoder.header().unwrap().compression_level(),
CompressionLevel::Default);
```
` ` ` use libflate :: zlib :: CompressionLevel ; use libflate :: non_blocking :: zlib :: Decoder . let mut decoder = Decoder :: new ( &encoded_data [ .. ] ) ; assert_eq! ( decoder . header () . unwrap () . compression_level () CompressionLevel :: Default ) ; ` ` `