Displaying 1 result from an estimated 1 matches for "xxh64_update".
2020 May 24
3
[PATCH] file_checksum() optimization
...izes that
@@ -362,9 +362,9 @@ void file_checksum(const char *fname, const
STRUCT_STAT *st_p, char *sum)
exit_cleanup(RERR_STREAMIO);
}
- for (i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) {
+ for (i = 0; i + CHUNK_SIZE <= len; i += CHUNK_SIZE) {
XXH_errorcode const updateResult =
- XXH64_update(state, (uchar *)map_ptr(buf, i, CSUM_CHUNK), CSUM_CHUNK);
+ XXH64_update(state, (uchar *)map_ptr(buf, i, CHUNK_SIZE), CHUNK_SIZE);
if (updateResult == XXH_ERROR) {
rprintf(FERROR, "error computing XXH64 hash");
exit_cleanup(RERR_STREAMIO);
@@ -373,7 +373,7 @@ void file_checksum(c...