The Zarr "CRC32C" codec computes a 32-bit checksum of a raw vector. Upon encoding the codec appends the checksum to the end of the vector. When decoding, the final 4 bytes from the raw vector are extracted and compared to the checksum of the remainder of the raw vector - if the two don't match a warning is generated.
zarr::zarr_extension -> zarr::zarr_codec -> zarr_codec_crc32c
Inherited methods
new()Create a new "crc32c" codec object.
zarr_codec_crc32c$new()configurationOptional. A list with the configuration parameters for this codec but since this codec doesn't have any the argument is always ignored.
An instance of this class.
copy()Create a new, independent copy of this codec.
zarr_codec_crc32c$copy()An instance of zarr_codec_crc32c.
encode()This method computes the CRC32C checksum of a data object and appends it to the data object.
zarr_codec_crc32c$encode(data)dataA raw vector whose checksum to compute.
The input data raw vector with the 32-bit checksum appended to
it.
decode()This method extracts the CRC32C checksum from the trailing 32-bits of a data object. It then computes the CRC32C checksum from the data object (less the trailing 32-bits) and compares the two values. If the values differ, a warning will be issued.
zarr_codec_crc32c$decode(data)dataThe raw vector whose checksum to verify.
The data raw vector with the trailing 32-bits removed.