0.1.0 • Published 5 months ago
smolxxh v0.1.0
Smol xxHash
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
Installation
The package is available on npm:
npm install smolxxh
Usage
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
Changelog
See the changelog.
License
0.1.0
5 months ago