When you serve millions of structured B2B datasets from public corporate registries, storing flat CSV files on disk breaks down quickly. Even compressed with gzip, three million prebuilt spreadsheets consume terabytes of NVMe storage and take hours to refresh whenever an upstream registry publishes a new snapshot.

We solved this by separating page metadata from row storage and compiling 3,149,628 buyable CSV datasets across 27 sharded families and 10 native languages down to roughly 550 bytes per dataset page. You can browse the live catalog on the SpecStream Ready CSV Lists Directory and inspect the top commercial index in the SpecStream Top Lists XML Sitemap.

The Two Layer SQLite Architecture

Each dataset family lives in a single directory containing a JSON manifest, one or more zdict compressed SQLite shard files for page metadata, and one indexed records.sqlite lookup database.

Instead of materializing millions of redundant CSV files, each page entry stores only the slice title, exact row count, price tier, 8 preview rows, and a validated filter dictionary such as {"state_slug": "california", "naics_slug": "541511"}. Every filter column is whitelisted in manifest.json and backed by a composite B tree index inside records.sqlite.

When a buyer completes checkout, the delivery engine resolves the shard via crc32(key) % num_shards, reads the validated filter dictionary, streams the matching rows from records.sqlite, and writes a gzip compressed CSV in under a second.

import zlib def shard_of(key: str, num_shards: int) -> int: return (zlib.crc32(key.encode("utf-8")) % num_shards) + 1 

Why Zlib Dictionaries Cut Metadata Size by 6x

Standard deflate compression resets its sliding window on every row, so short JSON payloads of 2 KB barely shrink. Training a shared 32 KB zdict on 200 sampled dataset payloads per family captures repeated keys, column labels, licence strings, and URL prefixes once in the shard meta table.

Across our largest corporate registries, that brings average on disk storage down to roughly 550 bytes per compiled dataset page while keeping point lookups under 1 millisecond on local NVMe.

Zero PII and Atomic Swaps

Every compiler runs a strict scrubbing pass before writing a single row: personal email addresses and phone numbers are stripped, sole proprietors and natural persons are filtered out where registries separate entity types, and every row retains a canonical government or primary Source URL.

Each family compiles into a hidden staging directory, verifies PRAGMA quick_check on every SQLite shard, checks that at least 80 GiB of disk remains free, and swaps into place atomically with rename().

Explore the full catalog at SpecStream Data Lists or fetch the programmatic index at SpecStream Top Lists Sitemap.