Helper function for is_rdata, checks if the file is a compressed (gzip) file. Does not (yet) check for bzip2 or xz compression.
is_compressed(filename, magic.number = as.raw(c("0x1f", "0x8b")))
boolean, TRUE if the file is compressed
The filename of the file to test for magic compression codes
The magic numbers in as a vector of strings with the hexadecimal numbers (e.g. "0x1f")