PearsonHash.jl

A Julia package for implementing Pearson hash functions
Author darsnack
Popularity
1 Star
Updated Last
3 Years Ago
Started In
January 2020

PearsonHash

Build Status

This package provides utility functions for Pearson hashing. You can use the standard 8-bit hash function:

julia> hash8("Test")
77

Or use hashn to get multiple of 8 bits (i.e. (8*n)-bit hash) where n is based on the return type specified):

julia> hashn(UInt16, "Test")
0x424d

Note that hashn converts the data passed in using Vector{UInt8}(data). This will result in extra allocations if data is mutable.

Documentation

For this simple package, just use the REPL:

julia> ?hash8
julia> ?hashn!
julia> ?hashn