package
1.0.2
Repository: https://github.com/btcsuite/btcutil.git
Documentation: pkg.go.dev

# README

gcs

[Build Status] (https://travis-ci.org/btcsuite/btcutil) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [GoDoc] (http://godoc.org/github.com/btcsuite/btcutil/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/btcsuite/btcutil/gcs

License

Package gcs is licensed under the copyfree ISC License.

# Packages

# 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.