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
Macros | Functions | Variables
SuperFastHash.cpp File Reference
`#include "slikenet/SuperFastHash.h"`
`#include "slikenet/NativeTypes.h"`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include "slikenet/linux_adapter.h"`
`#include "slikenet/osx_adapter.h"`

Go to the source code of this file.

## Macros

#define | get16bits(d)

## Functions

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)

## Variables

static const int | INCREMENTAL_READ_BLOCK =65536

## Macro Definition Documentation

#define get16bits | ( |  | d | ) |

Value:
((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
+(uint32_t)(((const uint8_t *)(d))[0]) )

Definition at line 32 of file SuperFastHash.cpp.

Referenced by SuperFastHashIncremental().

## Function Documentation

uint32_t SuperFastHash | ( | const char * | data,
|  | int | length
| ) |  |

Definition at line 38 of file SuperFastHash.cpp.

References INCREMENTAL_READ_BLOCK, and SuperFastHashIncremental().

uint32_t SuperFastHashFile | ( | const char * | filename | ) |

Definition at line 106 of file SuperFastHash.cpp.

References SuperFastHashFilePtr().

uint32_t SuperFastHashFilePtr | ( | FILE * | fp | ) |

Definition at line 116 of file SuperFastHash.cpp.

References INCREMENTAL_READ_BLOCK, and SuperFastHashIncremental().

Referenced by SuperFastHashFile().

uint32_t SuperFastHashIncremental | ( | const char * | data,
|  | int | len,
|  | unsigned int | lastHash
| ) |  |

Definition at line 58 of file SuperFastHash.cpp.

References get16bits.

Referenced by SuperFastHash(), SuperFastHashFilePtr(), and SLNet::SystemAddress::ToInteger().

## Variable Documentation

const int INCREMENTAL_READ_BLOCK =65536

static

Definition at line 36 of file SuperFastHash.cpp.

Referenced by SuperFastHash(), and SuperFastHashFilePtr().