Skip to content

#️⃣ A collection of hash functions

License

Notifications You must be signed in to change notification settings

mulle-c/mulle-data

Repository files navigation

mulle-data

#️⃣ A collection of hash functions

  • bit avalance for integers and pointers
  • FNV1A for hashing strings for hashtables
  • farmhash for (large) data

It contains the convenient struct mulle_data to keep bytes and length together and to pass it around.

And it contains struct mulle_range, which represents ranges of data with a location (offset) and a length.

Release Version Release Notes AI Documentation
Mulle kybernetiK tag Build Status Coverage RELEASENOTES DeepWiki for mulle-data

API

Documentation Description
mulle-data struct mulle_data holds a pointer to a block of memory (void *bytes) and its length in bytes (size_t length).
mulle-fnv1a FNV-1a is a fast, non-cryptographic hash that provides good distribution and low collisions for strings
mulle-hash MurmurHash3 and FarmHash for fast, efficient, and high-quality hashes of arbitraty data
mulle-prime Prime number support for hashtables
mulle-range struct mulle_range defines a range with a location and length

You are here

Overview

Quickstart

Install mulle-core developer then:

mulle-sde init -d my-project -m mulle-core/c-developer executable
cd my-project
mulle-sde vibecoding on
mulle-sde run

You are done, skip the following "Add" step.

Add

This project is a component of the mulle-core library. As such you usually will not add or install it individually, unless you specifically do not want to link against mulle-core.

Add as an individual component

Use mulle-sde to add mulle-data to your project:

mulle-sde add github:mulle-c/mulle-data

To only add the sources of mulle-data with dependency sources use clib:

clib install --out src/mulle-c mulle-c/mulle-data

Add -isystem src/mulle-c to your CFLAGS and compile all the sources that were downloaded with your project.

Install

Use mulle-sde to build and install mulle-data and all dependencies:

mulle-sde install --prefix /usr/local \
   https://github.com/mulle-c/mulle-data/archive/latest.tar.gz

Legacy Installation

Install the requirements:

Requirements Description
mulle-c11 🔀 Cross-platform C compiler glue (and some cpp conveniences)

Download the latest tar or zip archive and unpack it.

Install mulle-data into /usr/local with cmake:

PREFIX_DIR="/usr/local"
cmake -B build                               \
      -DMULLE_SDK_PATH="${PREFIX_DIR}"       \
      -DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \
      -DCMAKE_PREFIX_PATH="${PREFIX_DIR}"    \
      -DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release

Author

Nat! for Mulle kybernetiK

About

#️⃣ A collection of hash functions

Topics

Resources

License

Stars

Watchers

Forks

Contributors