return false;
}
- XXH64_reset(checksum, 0);
- XXH64_update(checksum, header_bytes, sizeof(header_bytes));
+ if (checksum) {
+ XXH64_reset(checksum, 0);
+ XXH64_update(checksum, header_bytes, sizeof(header_bytes));
+ }
*decompr_state = (*decompressor)->init(input, checksum);
if (!*decompr_state) {
// decompressor_state: State for the decompressor. Should be NULL if
// decompressor is NULL.
// checksum: Checksum state that will be updated with the read bytes.
-// Pass NULL if decompressor is NULL.
+// May be NULL for no checksumming.
bool common_header_initialize_for_reading(
struct common_header *header,
FILE *input,