Skip to content

Repository files navigation

FarmHash64

Provides farmhash64 and farmhash32 hash functions in multiple languages

Sponsor on GitHub

If this project is useful to you, please consider supporting development via GitHub Sponsors.

check

Description

FarmHash is a family of hash functions.

FarmHash64 is a 64-bit fingerprint hash function that generates a hash value for a given string. It is optimized for speed and produces well-distributed hashes, but it is not intended for cryptographic use.

The FarmHash32 function is also available, providing a 32-bit fingerprint hash for strings.

All FarmHash algorithms build upon prior work by Jyrki Alakuijala, Austin Appleby, Bob Jenkins, and others.

This project is a multi-language rewrite of the original Fingerprint64 (farmhashna::Hash64) implementation from Google's FarmHash (github.com/google/farmhash), by Nicola Asuni (Tecnick.com).

  • C (header-only compatible with CPP)
  • CGO (C wrapper)
  • GO
  • Java
  • Javascript
  • PHP
  • Python (C wrapper)
  • R (C wrapper)
  • Rust
  • Zig

Getting Started

The reference code of this application is written in header-only C language.

A Makefile is available to build the project in a Linux-compatible system with simple commands.
All the artifacts and reports produced using this Makefile are stored in the target folder inside each language directory.

To see all available options:

make help

Use the command make all to build and test all the implementations.

About

farmhash64 is a portable multilanguage 64-bit hash function

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

11 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages