Skip to content

juanbono/xor-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xor filter

badge

A faster and smaller alternative to bloom filters and cuckoo filters[0].

I ported it to Rust just as an excuse to learn about the algorithm, benchmarking and probabilistic data structures.

Usage

This library provides the Xor8 datatype.

It provides 2 functions:

  • new: to initialize a new filter with the provided keys.
  • contains: to perform membership checks
use xor_filter::Xor8;

fn main() {
    let keys = vec![1, 2, 3];
    let filter = Xor8::new(keys);

    assert!(filter.contains(1));
}

Status

The code is an almost verbatim port of the reference implementation made in Go.

References

[0] Xor Filters: Faster and Smaller Than Bloom Filters

About

xor filters implementation in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages