Tiny xxHash JS implementation.
It is a modern, faster and smaller alternative to xxhashjs package. It is 3.8x faster and fits in just 381B
.
It is just 1.8x slower than xxhash-wasm package.
It features dual CJS/ESM support and built-in TypeScript definitions.
It is based on a reference C implementation
The package is available on npm:
npm install smolxxh
Pass Buffer
or Uint8Array
to xxh32
function to get the hash of the content:
import { xxh32 } from "smolxxh";
xxh32(Buffer.from("hello world", "utf8")).toString(16);
// => 0x31b7405d
See the changelog.