Reads the crc from a gzip file, assuming it is the last 4 bytes of the file. First checks for a valid gzip magic number at the start of the file.
gzip.crc(f)
hexadecimal formatted
CRC32 is not a strong hash like SHA1 or even MD5, but it does provide a basic hash of the uncompressed contents of the gzip file. NB CRCs are stored in little endian byte order regardless of platform.
rdsfile=system.file('help/aliases.rds')
gzip.crc(rdsfile)
#> [1] "33ea28c5"