Smart2Raw
EN PT

The intelligence is in the classification. What comes out is raw bytes.

Your integer column is 8 bytes wide because nobody asked how big it really is.

Smart2Raw asks. It measures the real range of a column and stores it in the smallest native integer class that range needs — 8, 16, 32 or 64 bits, signed or not. No dictionary, no bit-packing, no decode step: the stored bytes are native integers, so every operation runs on them directly.

smaller than int64 on a telemetry column of 0..200 — measured, and reproducible below
0dependencies. One header, C11, no build system
31test suites, 0 failures, on x86, ARM, RISC-V and big-endian
3versions deposited with a citable DOI

wasm

Where it fits

Every one of these already has an integer column in it. That is the whole addressable surface.

Databases and columnar engines

Ids, codes, dates, counters. The stored bytes are already native integers — no decode step, no materialisation, no dictionary resident in memory.

Operating systems and Linux

/proc counters, eBPF metrics, PIDs, inodes, uids, log timestamps. One header, C11, zero dependencies: it fits inside a daemon or an agent without dragging a library in.

Observability, IoT, telemetry

Fixed-interval time series, sensors, counters. This is where the common stride and the per-block frame of reference work together.

AI and machine learning

Token ids, vocabulary indices, feature ids, dataset offsets, neighbour lists from a vector index. Inference is bound by memory bandwidth, not FLOPs — reading fewer bytes with no decode cost is the currency that is missing.

Embedded, MCU, edge, automotive

Any reading buffer. The lean mode is already tested: no stdio, no mmap, no SIMD.

Financial market data

Prices in cents (a stride!), nanosecond timestamps, instrument ids. Tick data is the picture of the ideal case.

Developer tooling

Symbol tables, offsets, indices in compilers, linkers and binary formats. A single header drops into any build.

Why you can check every claim on this page

The demonstration above is not a JavaScript imitation of Smart2Raw. It is include/smart2raw.h itself, compiled to WebAssembly and running in your browser. When it reports a size, s2r_pool_bytes() answered. When it offers a .s2r to download, s2r_blocked_save() wrote those bytes — the page only swapped the disk for a block of memory.

And every number it can check against a naive loop, it checks: every value is read back and compared to the original, the block metadata's sum is compared to a plain sum, and the file is written, reopened, CRC-verified and compared again before the download button appears. A disagreement raises a red badge instead of printing a pretty number.

Deposited and citable

Three versions with their own DOI on Zenodo, with a concept DOI covering all of them. How to cite.

Open, under AGPL-3.0

The published version is free software. Building it into a closed product needs a commercial licence — which is also how you reach Smart2Raw Premium, the version that is not published.

Portable by construction

The same file runs on x86, ARM with NEON and SVE2, RISC-V with RVV, big-endian machines and microcontrollers — and now in WebAssembly and in a Windows executable with no CRT.