Options
All
  • Public
  • Public/Protected
  • All
Menu

External module stream

murmurhash-native/stream module.

Example:

import { createHash } from "murmurhash-native/stream"
import * as fs from "fs"

fs.createReadStream("hash_me.txt")
.pipe(createHash("murmurhash128x64", {seed: 42, encoding: "hex"}))
.pipe(fs.createWriteStream("hash_me.txt.hash"))

If you don't need stream interface prefer to use utilities from the incremental module.

Index

Functions

createHash

  • Constructs a new MurmurHash object that can be used to generate murmurhash digests from the data stream.

    If algorithm is an instance of a MurmurHash or a serialized object, the seed option is being ignored.

    Parameters

    Returns MurmurHash

  • Constructs a new MurmurHash object that can be used to generate murmurhash digests from the data stream.

    Parameters

    • algorithm: string

      one of the available murmurhash algorithms.

    • Optional seed: number

      initial hash seed as an unsigned 32-bit integer.

    Returns MurmurHash

getHashes

  • getHashes(): string[]
  • Lists available algorithm names for [createHash].

    Returns string[]

Generated using TypeDoc