Skip to content
Tech News
← Back to articles

RX – a new random-access JSON alternative

read original more articles
Why This Matters

REXC offers a groundbreaking alternative to JSON by providing a binary-encoded, highly efficient data format that significantly reduces size, accelerates lookups, and minimizes heap pressure. This innovation addresses the longstanding tradeoff between parsing speed and memory usage, making data handling faster and more resource-friendly for the tech industry and consumers alike.

Key Takeaways

REXC encoder, decoder, and data tool. Drop-in replacements for JSON.stringify and JSON.parse that produce smaller output, skip deserialization on read, and create near-zero heap allocations.

Why

JSON forces a tradeoff: parse everything up front (slow, memory-heavy) or don't cache at all. REXC eliminates the tradeoff:

18x smaller — binary-encoded numbers, de-duplicated strings, shared schemas, prefix-compressed paths.

— binary-encoded numbers, de-duplicated strings, shared schemas, prefix-compressed paths. 23,000x faster single-key lookup — O(log n) binary search on sorted indexes, directly on the encoded bytes. No parse step.

— O(log n) binary search on sorted indexes, directly on the encoded bytes. No parse step. Near-zero heap pressure — the parsed result is a Proxy over a flat byte buffer. The GC doesn't trace its contents.

Benchmarked on a real production dataset: a 35,000-key website deployment manifest.

Install

npm install @creationix/rx # library npm install -g @creationix/rx # CLI (global) npx @creationix/rx data.rx # CLI (one-off)

Quick Start

... continue reading