[−][src]Function gzip_header::read_gz_header
pub fn read_gz_header<R: Read>(r: &mut R) -> Result<GzHeader>
Try to read a gzip header from the provided reader.
Returns a GzHeader
with the fields filled out if sucessful, or an io::Error
with
ErrorKind::InvalidInput
if decoding of the header.
Note that a gzip steam can contain multiple "members". Each member contains a header, followed by compressed data and finally a checksum and byte count. This method will only read the header for the "member" at the start of the stream.