SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SuperFastHash.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014, Oculus VR, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * RakNet License.txt file in the licenses directory of this source tree. An additional grant
7 * of patent rights can be found in the RakNet Patents.txt file in the same directory.
8 *
9 */
10
11 #ifndef __SUPER_FAST_HASH_H
12 #define __SUPER_FAST_HASH_H
13
14 #include <stdio.h>
15 #include "NativeTypes.h"
16
17 // From http://www.azillionmonkeys.com/qed/hash.html
18 // Author of main code is Paul Hsieh
19 // I just added some convenience functions
20 // 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
21
22 uint32_t SuperFastHash (const char * data, int length);
23 uint32_t SuperFastHashIncremental (const char * data, int len, unsigned int lastHash );
24 uint32_t SuperFastHashFile (const char * filename);
25 uint32_t SuperFastHashFilePtr (FILE *fp);
26
27 #endif