Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

32 and 64 bit implementations of the non-crypto murmurhash2

branch: master
Octocat-spinner-32 src Bit more formatting
Octocat-spinner-32 .gitignore Add a POM
Octocat-spinner-32 pom.xml Minor pom syntax
Octocat-spinner-32 readme.md Newer guava docs
readme.md

murmurhash-java

This is an implementation by Viliam Holub of the fast non-cryptographic murmurhash2 algorithm.

It is written in Java and is implemented in both 32 and 64-bit versions.

If you want the latest in the world of murmur, check out Guava's Hashing class, which has 32 and 128 bit implementations of murmur3.

building

Build a package with maven:

mvn package

Run the tests:

mvn test

public api

public final class MurmurHash {
    public static int  hash32(final byte[] data, int length);
    public static long hash64(final byte[] data, int length);
    public static int  hash32(final byte[] data, int length, int seed);
    public static long hash64(final byte[] data, int length, int seed);
    public static int  hash32(final String text);
    public static long hash64(final String text);
    public static int  hash32(final String text, int from, int length);
    public static long hash64(final String text, int from, int length);
}

author

This code was released by Viliam into the public domain. More information is here.

Something went wrong with that request. Please try again.