This repository has been archived on 2026-04-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-04-01 23:13:15 +02:00

18 lines
644 B
C

#ifndef __SUPER_FAST_HASH_H
#define __SUPER_FAST_HASH_H
#include <stdio.h>
#include "NativeTypes.h"
// From http://www.azillionmonkeys.com/qed/hash.html
// Author of main code is Paul Hsieh
// I just added some convenience functions
// 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
uint32_t SuperFastHash (const char * data, int length);
uint32_t SuperFastHashIncremental (const char * data, int len, unsigned int lastHash );
uint32_t SuperFastHashFile (const char * filename);
uint32_t SuperFastHashFilePtr (FILE *fp);
#endif