Skip to main content

data_is_gzip

Function data_is_gzip 

Source
pub fn data_is_gzip(buffer: &[u8]) -> bool
Expand description

Checks whether the contents of a byte buffer is considered to be gzip compressed.

Detects whether buffer contains gzip compressed data by checking if it is longer than two bytes and whether the first two bytes are the GZIP_MAGIC_NUMBER.