Build the component that produces a complete cold segment directory from events and bitmaps. Inputs: encoded events, in-memory bitmaps, ledger offset array. Outputs: a segment directory containing:
events.pack — compressed events via packfile Writer, with ledger offset array embedded as app data
index.hash — MPHF built from all term keys
index.pack — serialized bitmaps, one per term, each prefixed with 4-byte fingerprint
Used by both freeze and backfill. Add tests that produce a segment directory and verify file contents.
Build the component that produces a complete cold segment directory from events and bitmaps. Inputs: encoded events, in-memory bitmaps, ledger offset array. Outputs: a segment directory containing:
events.pack— compressed events via packfile Writer, with ledger offset array embedded as app dataindex.hash— MPHF built from all term keysindex.pack— serialized bitmaps, one per term, each prefixed with 4-byte fingerprintUsed by both freeze and backfill. Add tests that produce a segment directory and verify file contents.