Expand description
The two checksums the compressed formats carry.
gzip (RFC 1952 §2.3.1) ends a member with a CRC-32 of the uncompressed data; zlib (RFC 1950 §2.2) ends its stream with an Adler-32. Neither is a cryptographic hash — they exist to catch a truncated or corrupted stream before a caller trusts the bytes that came out of the inflater — so the “no cryptography from scratch” exception does not apply and both are written here.
Both come in an incremental form (Crc32::new().update(..).finish()) for
callers that see the data in pieces, and a one-shot function for the
common case.