#include #include #include int main() { auto state = XXH3_createState(); XXH3_128bits_reset(state); char buffer[1048576]; ssize_t count; while ((count = read(STDIN_FILENO, buffer, sizeof(buffer))) > 0) XXH3_128bits_update(state, buffer, count); XXH128_canonical_t canon{}; XXH128_canonicalFromHash(&canon, XXH3_128bits_digest(state)); for (auto u : canon.digest) printf("%02x", u); printf("\n"); }