Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Murmur3

32-bit MurmurHash algorithm, version 3.

Hierarchy

  • Murmur3

Index

Methods

Methods

Static hash

  • hash(value: Uint8Array | string | number | boolean | null | undefined): number

Static mash

  • mash(code: number): number

Static mix

  • mix(code: number, value: number | string | Uint8Array): number
  • Mixes a new hash value into the accumulated hash code. If {@code value} is an array; mixes each consecutive 4-byte word in the into the accumulated hash code. If {@code value} is a string, mixes each consecutive 4-byte word in its UTF-8 encoding into the accumulated hash {@code code}.

    Parameters

    • code: number
    • value: number | string | Uint8Array

    Returns number

Static seed

  • seed(value: object | string | number | boolean | null | undefined): number
  • Returns the hash code of the name of a prototype object value, or for a primitive value.

    Parameters

    • value: object | string | number | boolean | null | undefined

    Returns number