4.6.0 (latest) 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.1 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0

    public sealed class BloomFilter : IMessage<BloomFilter>, IEquatable<BloomFilter>, IDeepCloneable<BloomFilter>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore v1 API class BloomFilter.

A bloom filter (<https://en.wikipedia.org/wiki/Bloom_filter>).

The bloom filter hashes the entries with MD5 and treats the resulting 128-bit
hash as 2 distinct 64-bit hash values, interpreted as unsigned integers
using 2's complement encoding.

These two hash values, named `h1` and `h2`, are then used to compute the
`hash_count` hash values using the formula, starting at `i=0`:

    h(i) = h1 + (i * h2)

These resulting values are then taken modulo the number of bits in the bloom
filter to get the bits of the bloom filter to test for the given entry.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BloomFilter

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BloomFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BloomFilter), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BloomFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BloomFilter), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BloomFilter](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BloomFilter), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Firestore.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)

## Assembly

Google.Cloud.Firestore.V1.dll

## Constructors

### BloomFilter()

    public BloomFilter()

### BloomFilter(BloomFilter)

    public BloomFilter(BloomFilter other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BloomFilter` |

## Properties

### Bits

    public BitSequence Bits { get; set; }

The bloom filter data.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.BitSequence` |   |

### HashCount

    public int HashCount { get; set; }

The number of hashes used by the algorithm.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |