Skip to content
A pure Elixir implementation of Cuckoo Filters.
Elixir
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock Update Murmur to 1.0.0. Oct 25, 2015

README.md

Cuckoo

Build Status Coverage Status Inline docs Hex docs Hex Version License

Cuckoo is a pure Elixir implementation of a Cuckoo Filter.

Usage

Add Cuckoo as a dependency in your mix.exs file.

def deps do
  [{:cuckoo, "~> 1.0"}]
end

Examples

iex> cf = Cuckoo.new(1000, 16, 4)
%Cuckoo.Filter{...}

iex> {:ok, cf} = Cuckoo.insert(cf, 5)
%Cuckoo.Filter{...}

iex> Cuckoo.contains?(cf, 5)
true

iex> {:ok, cf} = Cuckoo.delete(cf, 5)
%Cuckoo.Filter{...}

iex> Cuckoo.contains?(cf, 5)
false

Implementation Details

The implementation follows the specification as per the paper above.

For hashing we use the x64_128 variant of Murmur3 and the Erlang phash2.

Something went wrong with that request. Please try again.