moon-fuse

    MoonBit Binary Fuse filters with deterministic bounded construction

    binary-fuse
    xor-filter
    probabilistic
    static-set
    Download zip
    Version
    0.1.0
    License
    MIT
    Last updated
    8 days ago
    Downloads
    3

    #MoonFuse

    MoonFuse is a pure MoonBit implementation of an immutable, approximate membership filter. It uses a deterministic three-segment Binary-Fuse-style construction: build once from non-negative, distinct integer hashes, then query in constant time with no false negatives for successfully built input.

    This is intentionally not an exact set. A query that was not present during construction can return true; choose 8-bit fingerprints for lower memory or 16-bit fingerprints for a lower expected false-positive rate.

    #Use

    let filter = @fuse.BinaryFuseFilter::build([101, 202, 303]).unwrap()
    assert_true(filter.contains(202))
    assert_false(filter.contains(404)) // a miss is expected, but not guaranteed

    Run the checks and demo locally:

    moon check --deny-warn moon test --deny-warn moon run cmd/demo

    #Guarantees and boundaries

    • Input hashes must be non-negative and unique. The caller owns object/string hashing and collision policy.
    • Construction is deterministic and has a bounded retry budget; failure is a ConstructionFailed error, never an unbounded loop.
    • contains has no false negatives for the input that built a successfully validated filter. It may have false positives for other hashes.
    • encode_words / decode_words and compact encode_bytes / decode_bytes are versioned and reject malformed shape, width and out-of-range data.
    • encode_word_transport wraps any non-negative word codec in a versioned, checksummed byte transport; it detects accidental corruption but is not a cryptographic authenticity mechanism.
    • The current implementation optimizes reliability before density. It does not implement insert, delete, merging, cryptographic hashing or persistence beyond the checked word codec.

    #Provenance

    MoonFuse is independently written in MoonBit. The algorithm family is informed by the Binary Fuse Filters paper and public projects such as FastFilter/xorfilter; no upstream source, tests or generated data are copied. MoonFuse itself is MIT licensed.

    BinaryFuseFilter

    pub struct BinaryFuseFilter {
    key_count : Int
    segment_length : Int
    segment_count : Int
    seed : Int
    attempts : Int
    fingerprint_bits : Int
    fingerprints : Array[Int]
    }

    BinaryFuseFilter::bit_cost

    fn BinaryFuseFilter::bit_cost(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::bits_per_key_milli

    fn BinaryFuseFilter::bits_per_key_milli(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::build

    fn BinaryFuseFilter::build(hashes : Array[Int]) -> Result[BinaryFuseFilter, FuseError]

    BinaryFuseFilter::build16

    fn BinaryFuseFilter::build16(hashes : Array[Int]) -> Result[BinaryFuseFilter, FuseError]

    BinaryFuseFilter::build_with_options

    fn BinaryFuseFilter::build_with_options(hashes : Array[Int], options : BuildOptions) -> Result[BinaryFuseFilter, FuseError]

    BinaryFuseFilter::candidate_locations

    fn BinaryFuseFilter::candidate_locations(self : BinaryFuseFilter, hash : Int) -> FuseLocations?

    BinaryFuseFilter::candidate_xor

    fn BinaryFuseFilter::candidate_xor(self : BinaryFuseFilter, hash : Int) -> Int?

    BinaryFuseFilter::classify

    fn BinaryFuseFilter::classify(self : BinaryFuseFilter, hashes : Array[Int]) -> Array[MembershipResult]

    BinaryFuseFilter::contains

    fn BinaryFuseFilter::contains(self : BinaryFuseFilter, hash : Int) -> Bool

    BinaryFuseFilter::contains_all

    fn BinaryFuseFilter::contains_all(self : BinaryFuseFilter, hashes : Array[Int]) -> Bool

    BinaryFuseFilter::count_matches

    fn BinaryFuseFilter::count_matches(self : BinaryFuseFilter, hashes : Array[Int]) -> Int

    BinaryFuseFilter::encode_bytes

    fn BinaryFuseFilter::encode_bytes(self : BinaryFuseFilter) -> Bytes

    BinaryFuseFilter::encode_transport

    fn BinaryFuseFilter::encode_transport(self : BinaryFuseFilter) -> Result[Bytes, FuseError]

    BinaryFuseFilter::encode_words

    fn BinaryFuseFilter::encode_words(self : BinaryFuseFilter) -> Array[Int]

    BinaryFuseFilter::encoded_byte_length

    fn BinaryFuseFilter::encoded_byte_length(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::evaluate

    fn BinaryFuseFilter::evaluate(self : BinaryFuseFilter, source_hashes : Array[Int], probes : Array[Int]) -> Result[QualityReport, FuseError]

    BinaryFuseFilter::expected_false_positive_denominator

    fn BinaryFuseFilter::expected_false_positive_denominator(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::fingerprint_denominator

    fn BinaryFuseFilter::fingerprint_denominator(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::fingerprint_stats

    fn BinaryFuseFilter::fingerprint_stats(self : BinaryFuseFilter) -> FingerprintStats

    BinaryFuseFilter::has_valid_shape

    fn BinaryFuseFilter::has_valid_shape(self : BinaryFuseFilter) -> Bool

    BinaryFuseFilter::len

    fn BinaryFuseFilter::len(self : BinaryFuseFilter) -> Int

    BinaryFuseFilter::matches_fingerprint

    fn BinaryFuseFilter::matches_fingerprint(self : BinaryFuseFilter, hash : Int) -> Bool

    BinaryFuseFilter::query_all

    fn BinaryFuseFilter::query_all(self : BinaryFuseFilter, hashes : Array[Int]) -> QuerySummary

    BinaryFuseFilter::slot_fingerprints

    fn BinaryFuseFilter::slot_fingerprints(self : BinaryFuseFilter, hash : Int) -> Array[Int]

    BinaryFuseFilter::stats

    BinaryFuseFilter::uses_16bit_fingerprints

    fn BinaryFuseFilter::uses_16bit_fingerprints(self : BinaryFuseFilter) -> Bool

    BinaryFuseFilter::validate

    fn BinaryFuseFilter::validate(self : BinaryFuseFilter, hashes : Array[Int]) -> Bool

    BuildOptions

    pub(all) struct BuildOptions {
    fingerprint_bits : Int
    max_attempts : Int
    initial_seed : Int
    }

    BuildStats

    pub(all) struct BuildStats {
    key_count : Int
    array_length : Int
    segment_length : Int
    segment_count : Int
    seed : Int
    attempts : Int
    fingerprint_bits : Int
    }

    EpochFuseFilter

    pub struct EpochFuseFilter {
    epochs : Array[FuseEpoch]
    }

    EpochFuseFilter::build

    fn EpochFuseFilter::build(entries : Array[EpochHash]) -> Result[EpochFuseFilter, FuseError]

    EpochFuseFilter::contains_any

    fn EpochFuseFilter::contains_any(self : EpochFuseFilter, hash : Int) -> Bool

    EpochFuseFilter::contains_at

    fn EpochFuseFilter::contains_at(self : EpochFuseFilter, epoch : Int, hash : Int) -> Bool

    EpochFuseFilter::encode_transport

    fn EpochFuseFilter::encode_transport(self : EpochFuseFilter) -> Result[Bytes, FuseError]

    EpochFuseFilter::encode_words

    fn EpochFuseFilter::encode_words(self : EpochFuseFilter) -> Array[Int]

    EpochFuseFilter::epoch_count

    fn EpochFuseFilter::epoch_count(self : EpochFuseFilter) -> Int

    EpochFuseFilter::keep_from

    fn EpochFuseFilter::keep_from(self : EpochFuseFilter, minimum_epoch : Int) -> EpochFuseFilter

    EpochFuseFilter::stats

    EpochFuseFilter::validate

    fn EpochFuseFilter::validate(self : EpochFuseFilter, entries : Array[EpochHash]) -> Bool

    EpochFuseValue

    pub(all) struct EpochFuseValue {
    epoch : Int
    hash : Int
    value : Int
    }

    EpochHash

    pub(all) struct EpochHash {
    epoch : Int
    hash : Int
    }

    EpochMapStats

    pub(all) struct EpochMapStats {
    epoch_count : Int
    entry_count : Int
    first_epoch : Int
    last_epoch : Int
    }

    EpochStaticIntMap

    pub struct EpochStaticIntMap {
    epochs : Array[FuseMapEpoch]
    }

    EpochStaticIntMap::build

    EpochStaticIntMap::encode_transport

    fn EpochStaticIntMap::encode_transport(self : EpochStaticIntMap) -> Result[Bytes, FuseError]

    EpochStaticIntMap::encode_words

    fn EpochStaticIntMap::encode_words(self : EpochStaticIntMap) -> Array[Int]

    EpochStaticIntMap::entry_count

    fn EpochStaticIntMap::entry_count(self : EpochStaticIntMap) -> Int

    EpochStaticIntMap::epoch_count

    fn EpochStaticIntMap::epoch_count(self : EpochStaticIntMap) -> Int

    EpochStaticIntMap::get_at

    fn EpochStaticIntMap::get_at(self : EpochStaticIntMap, epoch : Int, hash : Int) -> Int?

    EpochStaticIntMap::get_at_or_before

    fn EpochStaticIntMap::get_at_or_before(self : EpochStaticIntMap, epoch : Int, hash : Int) -> Int?

    EpochStaticIntMap::keep_from

    fn EpochStaticIntMap::keep_from(self : EpochStaticIntMap, minimum_epoch : Int) -> EpochStaticIntMap

    EpochStaticIntMap::stats

    EpochStaticIntMap::validate

    fn EpochStaticIntMap::validate(self : EpochStaticIntMap) -> Bool

    EpochStats

    pub(all) struct EpochStats {
    epoch_count : Int
    key_count : Int
    first_epoch : Int
    last_epoch : Int
    }

    ExactMembershipResult

    pub(all) struct ExactMembershipResult {
    hash : Int
    contains : Bool
    }

    FingerprintStats

    pub(all) struct FingerprintStats {
    slot_count : Int
    occupied_slots : Int
    empty_slots : Int
    maximum_fingerprint : Int
    fingerprint_sum : Int
    }

    FuseBuilder

    pub struct FuseBuilder {
    hashes : Array[Int]
    }

    FuseBuilder::add

    fn FuseBuilder::add(self : FuseBuilder, hash : Int) -> Result[Unit, FuseError]

    FuseBuilder::add_all

    fn FuseBuilder::add_all(self : FuseBuilder, hashes : Array[Int]) -> Result[Unit, FuseError]

    FuseBuilder::build

    fn FuseBuilder::build(self : FuseBuilder) -> Result[BinaryFuseFilter, FuseError]

    FuseBuilder::build16

    fn FuseBuilder::build16(self : FuseBuilder) -> Result[BinaryFuseFilter, FuseError]

    FuseBuilder::clear

    fn FuseBuilder::clear(self : FuseBuilder) -> Unit

    FuseBuilder::len

    fn FuseBuilder::len(self : FuseBuilder) -> Int

    FuseBuilder::new

    FuseBuilder::with_capacity

    fn FuseBuilder::with_capacity(_capacity : Int) -> FuseBuilder

    FuseEpoch

    pub struct FuseEpoch {
    epoch : Int
    filter : BinaryFuseFilter
    }

    FuseError

    pub(all) enum FuseError {
    EmptyInput
    NegativeHash(Int)
    DuplicateHash(Int)
    InvalidFingerprintBits(Int)
    InvalidAttempts(Int)
    InvalidShardCount(Int)
    InvalidTag(Int)
    ConflictingValue(Int)
    DuplicateString(String)
    ConstructionFailed(Int)
    InvalidEncoding
    UnsupportedVersion(Int)
    }

    FuseFilterChain

    pub struct FuseFilterChain {
    filters : Array[BinaryFuseFilter]
    }

    FuseFilterChain::contains

    fn FuseFilterChain::contains(self : FuseFilterChain, hash : Int) -> Bool

    FuseFilterChain::encode_transport

    fn FuseFilterChain::encode_transport(self : FuseFilterChain) -> Result[Bytes, FuseError]

    FuseFilterChain::encode_words

    fn FuseFilterChain::encode_words(self : FuseFilterChain) -> Array[Int]

    FuseFilterChain::filter_count

    fn FuseFilterChain::filter_count(self : FuseFilterChain) -> Int

    FuseFilterChain::from_filters

    fn FuseFilterChain::from_filters(filters : Array[BinaryFuseFilter]) -> FuseFilterChain

    FuseFilterChain::key_count

    fn FuseFilterChain::key_count(self : FuseFilterChain) -> Int

    FuseFilterChain::query_all

    fn FuseFilterChain::query_all(self : FuseFilterChain, hashes : Array[Int]) -> QuerySummary

    FuseLocations

    pub(all) struct FuseLocations {
    first : Int
    second : Int
    third : Int
    }

    FuseMapEpoch

    pub struct FuseMapEpoch {
    epoch : Int
    map : StaticIntMap
    }

    FuseOverlay

    pub struct FuseOverlay {
    base : VerifiedFuseFilter
    additions : VerifiedFuseFilter?
    removals : VerifiedFuseFilter?
    }

    FuseOverlay::contains_exact

    fn FuseOverlay::contains_exact(self : FuseOverlay, hash : Int) -> Bool

    FuseOverlay::encode_transport

    fn FuseOverlay::encode_transport(self : FuseOverlay) -> Result[Bytes, FuseError]

    FuseOverlay::encode_words

    fn FuseOverlay::encode_words(self : FuseOverlay) -> Array[Int]

    FuseOverlay::from_patch

    fn FuseOverlay::from_patch(base : VerifiedFuseFilter, patch : FusePatch) -> Result[FuseOverlay, FuseError]

    FuseOverlay::materialize

    fn FuseOverlay::materialize(self : FuseOverlay) -> Result[VerifiedFuseFilter, FuseError]

    FuseOverlay::may_contain

    fn FuseOverlay::may_contain(self : FuseOverlay, hash : Int) -> Bool

    FuseOverlay::stats

    fn FuseOverlay::stats(self : FuseOverlay) -> OverlayStats

    FuseOverlay::validate

    fn FuseOverlay::validate(self : FuseOverlay) -> Bool

    FusePatch

    pub(all) struct FusePatch {
    additions : Array[Int]
    removals : Array[Int]
    }

    FuseValue

    pub(all) struct FuseValue {
    hash : Int
    value : Int
    }

    MapMergePolicy

    pub(all) enum MapMergePolicy {
    PreferLeft
    PreferRight
    RejectConflicts
    }

    MapMergeStats

    pub(all) struct MapMergeStats {
    left_only_count : Int
    right_only_count : Int
    shared_count : Int
    conflicting_count : Int
    }

    MapStats

    pub(all) struct MapStats {
    entry_count : Int
    smallest_key : Int
    largest_key : Int
    }

    MembershipResult

    pub(all) struct MembershipResult {
    hash : Int
    might_contain : Bool
    }

    OverlayStats

    pub(all) struct OverlayStats {
    base_key_count : Int
    addition_count : Int
    removal_count : Int
    }

    QualityReport

    pub(all) struct QualityReport {
    source_count : Int
    probe_count : Int
    false_negative_count : Int
    false_positive_count : Int
    negative_probe_count : Int
    }

    QuerySummary

    pub(all) struct QuerySummary {
    query_count : Int
    positive_count : Int
    negative_count : Int
    }

    ShardStats

    pub(all) struct ShardStats {
    shard_count : Int
    key_count : Int
    populated_shards : Int
    smallest_shard : Int
    largest_shard : Int
    }

    ShardedFuseFilter

    pub struct ShardedFuseFilter {
    shard_count : Int
    shards : Array[BinaryFuseFilter?]
    }

    ShardedFuseFilter::build

    fn ShardedFuseFilter::build(hashes : Array[Int], shard_count : Int) -> Result[ShardedFuseFilter, FuseError]

    ShardedFuseFilter::build_with_options

    fn ShardedFuseFilter::build_with_options(hashes : Array[Int], shard_count : Int, options : BuildOptions) -> Result[ShardedFuseFilter, FuseError]

    ShardedFuseFilter::contains

    fn ShardedFuseFilter::contains(self : ShardedFuseFilter, hash : Int) -> Bool

    ShardedFuseFilter::encode_transport

    fn ShardedFuseFilter::encode_transport(self : ShardedFuseFilter) -> Result[Bytes, FuseError]

    ShardedFuseFilter::encode_words

    fn ShardedFuseFilter::encode_words(self : ShardedFuseFilter) -> Array[Int]

    ShardedFuseFilter::len

    fn ShardedFuseFilter::len(self : ShardedFuseFilter) -> Int

    ShardedFuseFilter::stats

    ShardedFuseFilter::validate

    fn ShardedFuseFilter::validate(self : ShardedFuseFilter, hashes : Array[Int]) -> Bool

    SnapshotDiff

    pub(all) struct SnapshotDiff {
    additions : Array[Int]
    removals : Array[Int]
    shared_count : Int
    }

    SnapshotDiff::apply_to

    fn SnapshotDiff::apply_to(self : SnapshotDiff, source : VerifiedFuseFilter) -> Result[VerifiedFuseFilter, FuseError]

    SnapshotDiff::change_count

    fn SnapshotDiff::change_count(self : SnapshotDiff) -> Int

    SnapshotDiff::encode_transport

    fn SnapshotDiff::encode_transport(self : SnapshotDiff) -> Result[Bytes, FuseError]

    SnapshotDiff::encode_words

    fn SnapshotDiff::encode_words(self : SnapshotDiff) -> Array[Int]

    SnapshotDiff::is_empty

    fn SnapshotDiff::is_empty(self : SnapshotDiff) -> Bool

    SnapshotDiff::to_patch

    fn SnapshotDiff::to_patch(self : SnapshotDiff) -> FusePatch

    SnapshotDiff::validate

    fn SnapshotDiff::validate(self : SnapshotDiff) -> Bool

    StaticIntMap

    pub struct StaticIntMap {
    index : VerifiedFuseFilter
    values : Array[Int]
    }

    StaticIntMap::build

    fn StaticIntMap::build(entries : Array[FuseValue]) -> Result[StaticIntMap, FuseError]

    StaticIntMap::contains_key

    fn StaticIntMap::contains_key(self : StaticIntMap, hash : Int) -> Bool

    StaticIntMap::difference

    fn StaticIntMap::difference(self : StaticIntMap, other : StaticIntMap) -> Result[StaticIntMap, FuseError]

    StaticIntMap::encode_transport

    fn StaticIntMap::encode_transport(self : StaticIntMap) -> Result[Bytes, FuseError]

    StaticIntMap::encode_words

    fn StaticIntMap::encode_words(self : StaticIntMap) -> Array[Int]

    StaticIntMap::entries

    fn StaticIntMap::entries(self : StaticIntMap) -> Array[FuseValue]

    StaticIntMap::entries_before

    fn StaticIntMap::entries_before(self : StaticIntMap, first_key : Int, limit : Int) -> Array[FuseValue]

    StaticIntMap::entries_from

    fn StaticIntMap::entries_from(self : StaticIntMap, first_key : Int, limit : Int) -> Array[FuseValue]

    StaticIntMap::entries_inclusive

    fn StaticIntMap::entries_inclusive(self : StaticIntMap, first_key : Int, last_key : Int) -> Array[FuseValue]

    StaticIntMap::get

    fn StaticIntMap::get(self : StaticIntMap, hash : Int) -> Int?

    StaticIntMap::get_all

    fn StaticIntMap::get_all(self : StaticIntMap, hashes : Array[Int]) -> Array[Int?]

    StaticIntMap::get_ceiling

    fn StaticIntMap::get_ceiling(self : StaticIntMap, key : Int) -> FuseValue?

    StaticIntMap::get_floor

    fn StaticIntMap::get_floor(self : StaticIntMap, key : Int) -> FuseValue?

    StaticIntMap::intersection

    fn StaticIntMap::intersection(self : StaticIntMap, other : StaticIntMap, policy : MapMergePolicy) -> Result[StaticIntMap, FuseError]

    StaticIntMap::keys

    fn StaticIntMap::keys(self : StaticIntMap) -> Array[Int]

    StaticIntMap::len

    fn StaticIntMap::len(self : StaticIntMap) -> Int

    StaticIntMap::merge

    fn StaticIntMap::merge(self : StaticIntMap, other : StaticIntMap, policy : MapMergePolicy) -> Result[StaticIntMap, FuseError]

    StaticIntMap::merge_stats

    fn StaticIntMap::merge_stats(self : StaticIntMap, other : StaticIntMap) -> MapMergeStats

    StaticIntMap::rank

    fn StaticIntMap::rank(self : StaticIntMap, key : Int) -> Int

    StaticIntMap::stats

    fn StaticIntMap::stats(self : StaticIntMap) -> MapStats

    StaticIntMap::validate

    fn StaticIntMap::validate(self : StaticIntMap) -> Bool

    StaticIntMap::with_updates

    fn StaticIntMap::with_updates(self : StaticIntMap, updates : Array[FuseValue]) -> Result[StaticIntMap, FuseError]

    StaticIntMap::without_keys

    fn StaticIntMap::without_keys(self : StaticIntMap, hashes : Array[Int]) -> Result[StaticIntMap, FuseError]

    StaticStringMap

    pub struct StaticStringMap {
    filter : StringFuseFilter
    entries : Array[StringFuseValue]
    }

    StaticStringMap::build

    StaticStringMap::contains_key

    fn StaticStringMap::contains_key(self : StaticStringMap, key : String) -> Bool

    StaticStringMap::entries

    StaticStringMap::entries_before

    fn StaticStringMap::entries_before(self : StaticStringMap, first_key : String, limit : Int) -> Array[StringFuseValue]

    Returns up to limit shortlex-ordered entries strictly before first_key.

    StaticStringMap::entries_between

    fn StaticStringMap::entries_between(self : StaticStringMap, first_key : String, last_key : String) -> Array[StringFuseValue]

    Returns entries in MoonBit String::compare shortlex order.

    StaticStringMap::entries_from

    fn StaticStringMap::entries_from(self : StaticStringMap, first_key : String, limit : Int) -> Array[StringFuseValue]

    Returns a shortlex-ordered page beginning at the first matching key.

    StaticStringMap::get

    fn StaticStringMap::get(self : StaticStringMap, key : String) -> Int?

    StaticStringMap::get_all

    fn StaticStringMap::get_all(self : StaticStringMap, keys : Array[String]) -> Array[Int?]

    StaticStringMap::get_ceiling

    fn StaticStringMap::get_ceiling(self : StaticStringMap, key : String) -> StringFuseValue?

    Uses MoonBit's String::compare shortlex ordering (length, then charcode).

    StaticStringMap::get_floor

    fn StaticStringMap::get_floor(self : StaticStringMap, key : String) -> StringFuseValue?

    Uses MoonBit's String::compare shortlex ordering (length, then charcode).

    StaticStringMap::keys

    fn StaticStringMap::keys(self : StaticStringMap) -> Array[String]

    StaticStringMap::len

    fn StaticStringMap::len(self : StaticStringMap) -> Int

    StaticStringMap::rank

    fn StaticStringMap::rank(self : StaticStringMap, key : String) -> Int

    Returns the insertion rank under MoonBit String::compare shortlex order.

    StaticStringMap::stats

    StaticStringMap::validate

    fn StaticStringMap::validate(self : StaticStringMap) -> Bool

    StaticStringMap::with_updates

    fn StaticStringMap::with_updates(self : StaticStringMap, updates : Array[StringFuseValue]) -> Result[StaticStringMap, FuseError]

    StaticStringMap::without_keys

    fn StaticStringMap::without_keys(self : StaticStringMap, keys : Array[String]) -> Result[StaticStringMap, FuseError]

    StringFuseFilter

    pub struct StringFuseFilter {
    filter : BinaryFuseFilter
    }

    StringFuseFilter::build

    fn StringFuseFilter::build(values : Array[String]) -> Result[StringFuseFilter, FuseError]

    StringFuseFilter::build16

    fn StringFuseFilter::build16(values : Array[String]) -> Result[StringFuseFilter, FuseError]

    StringFuseFilter::contains

    fn StringFuseFilter::contains(self : StringFuseFilter, value : String) -> Bool

    StringFuseFilter::len

    fn StringFuseFilter::len(self : StringFuseFilter) -> Int

    StringFuseFilter::stats

    StringFuseValue

    pub(all) struct StringFuseValue {
    key : String
    value : Int
    }

    StringMapStats

    pub(all) struct StringMapStats {
    entry_count : Int
    shortest_key_length : Int
    longest_key_length : Int
    }

    TagStats

    pub(all) struct TagStats {
    tag_count : Int
    key_count : Int
    smallest_tag : Int
    largest_tag : Int
    }

    TaggedFuseFilter

    pub struct TaggedFuseFilter {
    tags : Array[Int]
    filters : Array[BinaryFuseFilter]
    }

    TaggedFuseFilter::build

    fn TaggedFuseFilter::build(entries : Array[TaggedHash]) -> Result[TaggedFuseFilter, FuseError]

    TaggedFuseFilter::contains

    fn TaggedFuseFilter::contains(self : TaggedFuseFilter, tag : Int, hash : Int) -> Bool

    TaggedFuseFilter::encode_transport

    fn TaggedFuseFilter::encode_transport(self : TaggedFuseFilter) -> Result[Bytes, FuseError]

    TaggedFuseFilter::encode_words

    fn TaggedFuseFilter::encode_words(self : TaggedFuseFilter) -> Array[Int]

    TaggedFuseFilter::key_count

    fn TaggedFuseFilter::key_count(self : TaggedFuseFilter) -> Int

    TaggedFuseFilter::stats

    TaggedFuseFilter::tag_count

    fn TaggedFuseFilter::tag_count(self : TaggedFuseFilter) -> Int

    TaggedFuseFilter::validate

    fn TaggedFuseFilter::validate(self : TaggedFuseFilter, entries : Array[TaggedHash]) -> Bool

    TaggedHash

    pub(all) struct TaggedHash {
    tag : Int
    hash : Int
    }

    VerifiedFuseFilter

    pub struct VerifiedFuseFilter {
    filter : BinaryFuseFilter
    sorted_hashes : Array[Int]
    }

    VerifiedFuseFilter::apply_patch

    fn VerifiedFuseFilter::apply_patch(self : VerifiedFuseFilter, patch : FusePatch) -> Result[VerifiedFuseFilter, FuseError]

    VerifiedFuseFilter::build

    fn VerifiedFuseFilter::build(hashes : Array[Int]) -> Result[VerifiedFuseFilter, FuseError]

    VerifiedFuseFilter::classify_exact

    fn VerifiedFuseFilter::classify_exact(self : VerifiedFuseFilter, hashes : Array[Int]) -> Array[ExactMembershipResult]

    VerifiedFuseFilter::contains_exact

    fn VerifiedFuseFilter::contains_exact(self : VerifiedFuseFilter, hash : Int) -> Bool

    VerifiedFuseFilter::count_exact_matches

    fn VerifiedFuseFilter::count_exact_matches(self : VerifiedFuseFilter, hashes : Array[Int]) -> Int

    VerifiedFuseFilter::diff

    VerifiedFuseFilter::difference

    VerifiedFuseFilter::encode_transport

    fn VerifiedFuseFilter::encode_transport(self : VerifiedFuseFilter) -> Result[Bytes, FuseError]

    VerifiedFuseFilter::encode_words

    fn VerifiedFuseFilter::encode_words(self : VerifiedFuseFilter) -> Array[Int]

    VerifiedFuseFilter::hashes

    fn VerifiedFuseFilter::hashes(self : VerifiedFuseFilter) -> Array[Int]

    VerifiedFuseFilter::intersection

    VerifiedFuseFilter::len

    fn VerifiedFuseFilter::len(self : VerifiedFuseFilter) -> Int

    VerifiedFuseFilter::may_contain

    fn VerifiedFuseFilter::may_contain(self : VerifiedFuseFilter, hash : Int) -> Bool

    VerifiedFuseFilter::symmetric_difference

    fn VerifiedFuseFilter::symmetric_difference(self : VerifiedFuseFilter, other : VerifiedFuseFilter) -> Result[VerifiedFuseFilter, FuseError]

    VerifiedFuseFilter::union

    VerifiedFuseFilter::validate

    fn VerifiedFuseFilter::validate(self : VerifiedFuseFilter) -> Bool

    decode_bytes

    fn decode_bytes(bytes : Bytes) -> Result[BinaryFuseFilter, FuseError]

    decode_chain_transport

    fn decode_chain_transport(bytes : Bytes) -> Result[FuseFilterChain, FuseError]

    decode_chain_words

    fn decode_chain_words(words : Array[Int]) -> Result[FuseFilterChain, FuseError]

    decode_epoch_map_transport

    fn decode_epoch_map_transport(bytes : Bytes) -> Result[EpochStaticIntMap, FuseError]

    decode_epoch_map_words

    fn decode_epoch_map_words(words : Array[Int]) -> Result[EpochStaticIntMap, FuseError]

    decode_epoch_transport

    fn decode_epoch_transport(bytes : Bytes) -> Result[EpochFuseFilter, FuseError]

    decode_epoch_words

    fn decode_epoch_words(words : Array[Int]) -> Result[EpochFuseFilter, FuseError]

    decode_filter_transport

    fn decode_filter_transport(bytes : Bytes) -> Result[BinaryFuseFilter, FuseError]

    decode_overlay_transport

    fn decode_overlay_transport(bytes : Bytes) -> Result[FuseOverlay, FuseError]

    decode_overlay_words

    fn decode_overlay_words(words : Array[Int]) -> Result[FuseOverlay, FuseError]

    decode_sharded_transport

    fn decode_sharded_transport(bytes : Bytes) -> Result[ShardedFuseFilter, FuseError]

    decode_sharded_words

    fn decode_sharded_words(words : Array[Int]) -> Result[ShardedFuseFilter, FuseError]

    decode_snapshot_diff_transport

    fn decode_snapshot_diff_transport(bytes : Bytes) -> Result[SnapshotDiff, FuseError]

    decode_snapshot_diff_words

    fn decode_snapshot_diff_words(words : Array[Int]) -> Result[SnapshotDiff, FuseError]

    decode_static_map_transport

    fn decode_static_map_transport(bytes : Bytes) -> Result[StaticIntMap, FuseError]

    decode_static_map_words

    fn decode_static_map_words(words : Array[Int]) -> Result[StaticIntMap, FuseError]

    decode_tagged_transport

    fn decode_tagged_transport(bytes : Bytes) -> Result[TaggedFuseFilter, FuseError]

    decode_tagged_words

    fn decode_tagged_words(words : Array[Int]) -> Result[TaggedFuseFilter, FuseError]

    decode_verified_transport

    fn decode_verified_transport(bytes : Bytes) -> Result[VerifiedFuseFilter, FuseError]

    decode_verified_words

    fn decode_verified_words(words : Array[Int]) -> Result[VerifiedFuseFilter, FuseError]

    decode_word_transport

    fn decode_word_transport(bytes : Bytes) -> Result[Array[Int], FuseError]

    decode_words

    fn decode_words(words : Array[Int]) -> Result[BinaryFuseFilter, FuseError]

    default_build_options

    fn default_build_options() -> BuildOptions

    empty_patch

    fn empty_patch() -> FusePatch

    encode_word_transport

    fn encode_word_transport(words : Array[Int]) -> Result[Bytes, FuseError]

    stable_string_hash

    fn stable_string_hash(value : String) -> Int

    word_transport_checksum

    fn word_transport_checksum(words : Array[Int]) -> Int