package
1.1.1
Repository: https://github.com/bitweb-project/bted.git
Documentation: pkg.go.dev

# README

gcs

[Build Status] (https://travis-ci.org/bitweb-project/bteutil) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [GoDoc] (http://godoc.org/github.com/bitweb-project/bted/bteutil/gcs)

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/bitweb-project/bted/bteutil/gcs

License

Package gcs is licensed under the copyfree ISC License.

# 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 Bytes().
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.