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