NAME
Google::Firestore::V1::BloomFilter - Compiled Protocol Buffers messages for google/firestore/v1/bloom_filter.proto
SYNOPSIS
use Google::Firestore::V1::BloomFilter;
my $msg = Google::Firestore::V1::BloomFilter::BitSequence->new({
bitmap => $bitmap,
padding => $padding,
});
# Read or update a field
my $val = $msg->bitmap();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Firestore::V1::BloomFilter::BitSequence->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/firestore/v1/bloom_filter.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Firestore::V1::BloomFilter::BitSequence
A sequence of bits, encoded in a byte array.
Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 _or fewer_ bits. The `padding` defines the number of bits of the last byte to be ignored as "padding". The values of these "padding" bits are unspecified and must be ignored.
To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`.
The "size" of a `BitSequence` (the number of bits it contains) is calculated by this formula: `(bitmap.length * 8) - padding`.
Inherits from Protobuf::Message.
Accessors
$msg->bitmap()/$msg->bitmap($value)Type:
BytesThe bytes that encode the bit sequence. May have a length of zero.
$msg->padding()/$msg->padding($value)Type:
Int32The number of bits of the last byte in `bitmap` to ignore as "padding". If the length of `bitmap` is zero, then this value must be `0`. Otherwise, this value must be between 0 and 7, inclusive.
Google::Firestore::V1::BloomFilter::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.
Inherits from Protobuf::Message.
Accessors
$msg->bits()/$msg->bits($value)Type:
Message(Google::Firestore::V1::BloomFilter::BitSequence)The bloom filter data.
$msg->hash_count()/$msg->hash_count($value)Type:
Int32The number of hashes used by the algorithm.
SEE ALSO
Protobuf, Protobuf::Message, Google::Firestore::V1::BloomFilter::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.