package
0.0.24
Repository: https://github.com/p9c/util.git
Documentation: pkg.go.dev

# README

gcs

(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) GoDoc

Package gcs provides an API for building and using a Golomb-coded set filter similar to that described here. A comprehensive suite of tests is provided to ensure proper functionality.

Installation and Updating

$ go get -u github.com/p9c/util/gcs

# Packages

No description provided by the author

# Functions

BuildGCSFilter builds a new GCS filter with the collision probability of `1/(2**P)`, key `key`, and including every `[]byte` in `data` as a member of the set.
FromBytes deserializes a GCS filter from a known N, P, and serialized filter as returned by Hash().
FromNBytes deserializes a GCS filter from a known P, and serialized N and filter as returned by NBytes().

# Constants

KeySize is the size of the byte array required for key material for the SipHash keyed hash function.

# Variables

ErrNTooBig signifies that the filter can't handle N items.
ErrPTooBig signifies that the filter can't handle `1/2**P` collision probability.

# Structs

Filter describes an immutable filter that can be built from a set of data elements, serialized, deserialized, and queried in a thread-safe manner.