.v3bin — Zero-Copy Binary Table Format & the 1.3 GB Combinatorial Vault (data-engineering spec)
Audience: data engineers, Rust/CUDA/NumPy developers.
TL;DR: 13 flat, little-endian,mmap-able tables with a 64-byte header, 39,077,004 exhaustively enumerated k-subset bitmasks, bootstrap statistics, covering designs and Pareto portfolios — reproducible from source, SHA-256-pinned, bit-exact between GPU and CPU, archived with a DOI. You can read every table from Python in one line withnumpy.memmap; the lottery application that produced them is irrelevant to using them as a dataset.
Permanent archive: https://doi.org/10.5281/zenodo.23992530 (CERN Zenodo, concept DOI → latest version). Source: github.com/quantbotsoftware/quantum-lab-649-rust-core.
1. Why a custom format
The engine needs to scan the entire universe of tickets of several games (C(49,6) = 13,983,816 · C(40,5) = 658,008 · C(40,6) = 3,838,380 · C(45,5)×20 = 24,435,180) on every evaluation, from both a 24-thread AVX2/POPCNT CPU path and a CUDA kernel, without deserialisation, allocation or copying. Requirements that ruled out JSON/CSV/Parquet/Arrow for the hot path:
| Requirement | Design decision |
|---|---|
| Zero-copy on open, O(1) random access | Fixed-size records, 64-byte header, memmap2::Mmap (Rust) / numpy.memmap (Python) |
| Same bytes consumed by CPU and GPU | Records are plain u64 / f32 little-endian, uploaded to VRAM as-is via pinned DMA (64 MiB chunks) |
| Verifiable integrity, no silent corruption | Header carries kind/n/k/count/record size; file length must equal 64 + count × record_bytes; SHA-256 of every file pinned in VAULT_MANIFEST.json |
| Reproducible | Every table is deterministically regenerated by rust-singularity-core-v3 vault-init (lexicographic enumeration, partitioned by first element so the global order is exact even in parallel) |
| Immutable after generation | Files are written once and kept 0444; the observatory reports is_0444 + header_valid for every table in its snapshot so tampering is visible |
2. Header (64 bytes, little-endian)
| Offset | Size | Type | Field | Value / meaning |
|---|---|---|---|---|
| 0 | 8 | bytes | magic | 51 4C 56 33 56 4C 54 01 = "QLV3VLT\x01" |
| 8 | 4 | u32 | version | 3 |
| 12 | 4 | u32 | table_kind | see §3 |
| 16 | 4 | u32 | n_pool | size of the number pool (49, 40, 45 …) |
| 20 | 4 | u32 | k_pick | numbers per ticket / draw (5, 6 …) |
| 24 | 8 | u64 | record_count | number of records |
| 32 | 8 | u64 | record_bytes | bytes per record (8, 24, 64, 128) |
| 40 | 24 | bytes | reserved | all zero |
Invariant: file_size == 64 + record_count × record_bytes. Readers must reject any file violating magic, version or size (the reference implementation does: vault::verify_header).
3. Table kinds & the 13 files
| # | File | kind | n | k | records | rec B | Content |
|---|---|---|---|---|---|---|---|
| 1 | loto_649_masks.v3bin | 1 | 49 | 6 | 13,983,816 | 8 | every 6-subset of {1..49} as a u64 bitmask, lexicographic |
| 2 | loto_540_tickets.v3bin | 1 | 40 | 5 | 658,008 | 8 | every 5-subset of {1..40} |
| 3 | loto_540_draws6.v3bin | 2 | 40 | 6 | 3,838,380 | 8 | every 6-subset of {1..40} (draw space of 5/40) |
| 4 | joker_base45_masks.v3bin | 1 | 45 | 5 | 1,221,759 | 8 | every 5-subset of {1..45} |
| 5 | joker_full_24m.v3bin | 3 | 45 | 5 | 24,435,180 | 8 | 5-subset in bits 0..44 + bonus ball (1..20) − 1 in bits 48..52 |
| 6 | cdv3_wheels_catalog.v3bin | 5 | — | — | 6,926 | 8 | covering-design ("wheel") catalogue, CD-V3 |
| 7 | cdv3q_wheels_catalog.v3bin | 6 | — | — | 6,926 | 8 | CD-V3Q variant |
| 8 | pmv3_boot1000_649.v3bin | 4 | 49 | 6 | 13,983,816 | 24 | per-ticket 6 × f32: [ev, q05, q25, q50, q75, q95] from a 1,000-replicate bootstrap |
| 9 | pmv3_boot1000_540.v3bin | 4 | 40 | 5 | 658,008 | 24 | idem, 5/40 |
| 10 | pmv3_boot1000_joker.v3bin | 4 | 45 | 5 | 24,435,180 | 24 | idem, Joker (586 MB — the largest table) |
| 11 | c3v2_pareto_portfolios.v3bin | 7 | — | — | 13,945 | 8 | exact Pareto-frontier portfolios, C3-V2 |
| 12 | c4v2_mc1m_summary.v3bin | 8 | 49 | 6 | 90 | 128 | Monte-Carlo (1M) summary rows, C4-V2 |
| 13 | ckv6_power_10k.v3bin | 9 | — | — | 10,000 | 64 | causal-power trajectories, CK-V6 |
Total: 1,291.8 MB, 39,077,004 ticket records in kinds 1–3. Exact sizes and SHA-256 for each file: vault/VAULT_MANIFEST.json.
Bitmask encoding (kinds 1–3): bit i−1 set ⇔ number i is in the ticket. Popcount of every record equals k. The enumeration is lexicographic, which makes the file also a perfect-hash: the rank of a ticket is its index (combinatorial number system), so "ticket → row" is O(k) arithmetic, no search.
4. Reading the tables without the application
Python / NumPy (zero-copy)
import numpy as np, struct
def open_v3bin(path):
hdr = open(path, "rb").read(64)
magic, ver, kind, n, k, count, rec = struct.unpack_from("<8sIIIIQQ", hdr, 0)
assert magic == b"QLV3VLT\x01" and ver == 3
dtype = {8: "<u8", 24: ("<f4", 6), 64: ("<u8", 8), 128: ("<u8", 16)}[rec]
return np.memmap(path, dtype=dtype, mode="r", offset=64, shape=(count,)), (kind, n, k)
masks, (kind, n, k) = open_v3bin("vault/loto_649_masks.v3bin")
balls = [i + 1 for i in range(n) if (int(masks[0]) >> i) & 1] # → [1, 2, 3, 4, 5, 6]
ev, (_, _, _) = open_v3bin("vault/pmv3_boot1000_649.v3bin") # shape (13983816, 6) float32
Measured on the reference laptop (NVMe): np.memmap open 0.2 ms; full-table popcount check of 13.98 M masks 0.55 s in pure NumPy.
Rust (reference implementation)
memmap2::MmapOptions::new().map(&file) → verify_header(&mmap, kind, n, k, count) → bytemuck-style reinterpret of &mmap[64..] as &[u64]. See src/vault.rs (MappedVaultUniverse::open_or_build) and src/v3_observatory.rs (ALL_13_V3BIN_FILES).
Verify integrity
cd vault && sha256sum -c <(python3 -c "import json;[print(f['sha256'],' ',f['filename']) for f in json.load(open('VAULT_MANIFEST.json'))['files']]")
5. Gate A0 — bit-exact GPU ⇄ CPU parity, measured
rust-singularity-core-v3 a0-parity maps the Vault, DMA-uploads the 39 M masks to VRAM (353 MB resident), runs the popcount/match kernels on the GPU and the AVX2/POPCNT path on all CPU threads, and compares results bit-for-bit. Real run, 2026-11-06, Intel i7-14650HX (24 threads) + RTX 5060 Laptop (sm_120, 26 SMs, 8 GB):
| Table | GPU (ms) | CPU 24T (ms) | Zero-diff |
|---|---|---|---|
| 6/49 masks (13.98 M) | 7.66 | 8.99 | ✅ |
| 5/40 draws6 (3.84 M) | 2.20 | 1.86 | ✅ |
| Joker full (24.44 M) | 14.53 | 12.96 | ✅ |
VRAM upload 45 ms for 353 MB via pinned 64 MiB chunks · process RSS 616 MB (guard limit 11.5 GiB) · GPU throughput 13.9 G ops/s.
Honest reading: for this memory-bound popcount workload a modern 24-thread CPU with POPCNT matches a laptop GPU — the GPU path exists for the heavier PM-V3 / CK-V6 kernels, and Gate A0's purpose is parity (the same bytes give the same answers on both devices), not a speed-up claim. positive_claims_allowed is hard-wired to false in every report the engine writes.
6. Reproducing the Vault from source
./scripts/download_vault.sh # 1.3 GB from Zenodo (latest version resolved at runtime), SHA-256 verified
# or regenerate the tables locally (parallel lexicographic enumeration; the PM-V3 bootstrap tables are the slow part):
cargo build --release && ./target/release/rust-singularity-core-v3 vault-init
Build requirements and CUDA arch overrides: see QUANTUM_RUST_CORE_V3_USER_MANUAL.md.
7. What this is not
The tables enumerate combinatorial spaces and store statistics computed from historical draws. They do not — and mathematically cannot — predict future lottery draws. They are published as a reproducible engineering artefact (format, integrity chain, GPU/CPU parity harness, HPC build) under MIT, strictly AS-IS.