MurmurHash.h
author Jens Alfke <jens@mooseyard.com>
Mon Aug 10 08:29:32 2009 -0700 (2009-08-10)
changeset 34 50c4f26bcc1b
permissions -rw-r--r--
Fixed signed/unsigned warnings in Base64.m.
jens@1
     1
/*
jens@1
     2
 *  MurmurHash.h
jens@1
     3
 *  MYUtilities
jens@1
     4
 *
jens@1
     5
 *  This file created by Jens Alfke on 3/17/08.
jens@1
     6
 *  Algorithm & source code by Austin Appleby, released to public domain.
jens@1
     7
 *  <http://murmurhash.googlepages.com/>
jens@1
     8
 *
jens@1
     9
 */
jens@1
    10
jens@1
    11
#include <stdint.h>
jens@1
    12
#include <sys/types.h>
jens@1
    13
jens@1
    14
/** An extremely efficient general-purpose hash function.
jens@1
    15
    Murmurhash is claimed to be more than twice as fast as the nearest competitor,
jens@1
    16
    and to offer better-distributed output with fewer collisions.
jens@1
    17
    It is, however not suitable for cryptographic use.
jens@1
    18
    Hash values will differ between bit- and little-endian CPUs, so they shouldn't
jens@1
    19
    be stored persistently or transmitted over the network.
jens@1
    20
 
jens@1
    21
    Written by Austin Appleby: <http://murmurhash.googlepages.com/> */
jens@1
    22
jens@1
    23
uint32_t MurmurHash2 ( const void * key, size_t len, uint32_t seed );