![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 #ifndef __SUPER_FAST_HASH_H 00002 #define __SUPER_FAST_HASH_H 00003 00004 #include <stdio.h> 00005 #include "NativeTypes.h" 00006 00007 // From http://www.azillionmonkeys.com/qed/hash.html 00008 // Author of main code is Paul Hsieh 00009 // I just added some convenience functions 00010 // Also note http://burtleburtle.net/bob/hash/doobs.html, which shows that this is 20% faster than the one on that page but has more collisions 00011 00012 uint32_t SuperFastHash (const char * data, int length); 00013 uint32_t SuperFastHashIncremental (const char * data, int len, unsigned int lastHash ); 00014 uint32_t SuperFastHashFile (const char * filename); 00015 uint32_t SuperFastHashFilePtr (FILE *fp); 00016 00017 #endif
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.