This implements a Golomb‐coded set as defined in BIP 158. It is a compact, probabilistic data structure for testing set membership.
Synopsis
Declared in <blockfilter.h>
class GCSFilter;
Types
Name |
Description |
Parameters controlling the SipHash keys and Golomb‐Rice encoding of a filter. |
Type Aliases
Name |
Description |
A single set element, stored as a raw byte sequence. |
|
A collection of unique elements used to build or query a filter. |
Member Functions
Name |
Description |
|
Constructors |
Returns the serialized filter contents. |
|
Returns the number of elements in the filter. |
|
Returns the parameters used to build the filter. |
|
Checks if the element may be in the set. False positives are possible with probability 1/M. |
|
Checks if any of the given elements may be in the set. False positives are possible with probability 1/M per element checked. This is more efficient that checking Match on multiple elements separately. |
Created with MrDocs