[#GCSFilter]
= GCSFilter
:mrdocs:

This implements a Golomb&hyphen;coded set as defined in BIP 158&period; It is a compact, probabilistic data structure for testing set membership&period;

== Synopsis

Declared in `&lt;blockfilter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class GCSFilter;
----

== Types

[cols="1,4"]
|===
| Name| Description
| xref:GCSFilter/Params.adoc[`Params`] 
| Parameters controlling the SipHash keys and Golomb&hyphen;Rice encoding of a filter&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:GCSFilter/Element.adoc[`Element`] 
| A single set element, stored as a raw byte sequence&period;
| xref:GCSFilter/ElementSet.adoc[`ElementSet`] 
| A collection of unique elements used to build or query a filter&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:GCSFilter/2constructor-0a.adoc[`GCSFilter`]         [.small]#[constructor]#
| Constructors
| xref:GCSFilter/GetEncoded.adoc[`GetEncoded`] 
| Returns the serialized filter contents&period;
| xref:GCSFilter/GetN.adoc[`GetN`] 
| Returns the number of elements in the filter&period;
| xref:GCSFilter/GetParams.adoc[`GetParams`] 
| Returns the parameters used to build the filter&period;
| xref:GCSFilter/Match.adoc[`Match`] 
| Checks if the element may be in the set&period; False positives are possible with probability 1&sol;M&period;
| xref:GCSFilter/MatchAny.adoc[`MatchAny`] 
| Checks if any of the given elements may be in the set&period; False positives are possible with probability 1&sol;M per element checked&period; This is more efficient that checking Match on multiple elements separately&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
