def bloom_bits
import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstableimport Base
90# --- Bloom allocator (Monkey-style: smaller/upper levels get more bits) ---
91# Closed form pinned here; Dayan-exact coefficients are tuning follow-up.
92def bloom_bits(level: Nat, est_keys: Nat) -> Nat:
93 match level:
94 case 0n:
95 Nat.mul(est_keys, 20n)
96 case 1n+m:
97 match m:
98 case 0n:
99 Nat.mul(est_keys, 10n)
100 case 1n+p:
101 Nat.mul(est_keys, 5n)