The story and the idea

An idea ahead of its hardware

Cubrim grew out of an idea that waited years for the tools to test it. Here is where it came from, what it is for, how the archiver works today, and why AI agents now drive its development — with a human in the loop.

How it started

University years

The notion of "universal data matrices" first occurred to the founder back in his student days. Some of the ideas looked simple; others were too large to unfold in his head and even roughly judge whether they were worth pursuing.

The pause

At the time there was neither the compute nor the storage to test the idea in practice. After experimenting with a few dozen approaches, the project was shelved — not as a failure, but as an idea ahead of the hardware then available.

The return

Once AI agents arrived, testing hypotheses became fast and cheap. That is what brought the project back to life: work that once took months by hand now fits into a manageable loop of experiments.

What it is for

Cubrim is two projects on a shared foundation. One already works; the other is still a research hypothesis.

Cubrim-1 — the local archiver

shipping, written in Rust

Lossless compression for arbitrary data — documents, logs, binaries, datasets — through a single pipeline. It is a tangible artifact you can measure, and it is the one the AI agents improve.

Cubrim-2 — the global addressor

research hypothesis

The theoretical premise of Cubrim-2 is that much data need not be stored in full, but addressed against pre-computed "universal matrices". This is a theory, not a product: it needs practical proof, and that is the work we are doing.

Compression as the third pillar

We propose treating compression as a third fundamental data operation, alongside sorting and search. The more compact the data, the cheaper it is to store and to move — and on high-latency channels that matters a great deal.

Why aim that far

One scenario where addressing pre-computed matrices would matter is interplanetary links (the Moon, Mars), where latency is high and every byte is expensive. That is not the near-term goal, but it frames the problem at the right scale.

How Cubrim-1 works

The archiver turns a stream of bytes into a compact archive through a fixed pipeline. Every step is reversible — decoding walks it backwards and rebuilds the original bytes exactly.

1

Domainization

The input bytes become a sequence of values in the 0–255 range — the raw material the cube is built from.

2

N-dimensional cube (φ-mapping)

Each value lands at a coordinate inside an N-dimensional cube: a position maps to coordinates through the mixed-radix function φ. By default this is a 256×256 grid.

3

Distance map

Only populated cells are kept. Along each axis Cubrim records the distance to the next populated point — gaps instead of absolute coordinates.

4

Run-length encoding (RLE)

The gap streams collapse: a run of identical values becomes a single (value, count) pair. Regular, clustered layouts compress especially well here.

5

Competitive value coding

The value stream is packed by several schemes at once — bit-packing, RLE codes, context Huffman, the BWT family with geomix — and the smallest result is written to the archive. Cubrim picks the best scheme per file rather than a single fixed "level".

6

Assembly and safeguard

A compact header is prepended and the streams are concatenated into the archive. If the cube path would not beat storing the input verbatim, Cubrim falls back to raw-store — so the output never grows.

There is no lossy mode: a byte-for-byte round-trip check is built into every measurement.

See the algorithm in action

Research that never sleeps

A team of AI agents develops Cubrim in a continuous loop — but the final call stays with a human.

An endless hypothesis loop

The agents continually generate and test compression ideas: what to try, why it might shrink the data, and how it actually performed on the benchmark.

A human in the loop

The AI does not change the code unchecked. The operator reviews the results and merges only the branches that genuinely moved the record.

Radical transparency

Every hypothesis is published to the evolution feed — dead ends and losses included. Nothing is hidden: a negative result is a result too.

Honest scope

An honest word on where we stand: on the unified world corpus Cubrim now ranks #1 of 10 overall by size-weighted aggregate ratio. That does not mean every type is solved: ppmd still leads text, 7z remains strong on exe and binary, and individual file losses are visible on the benchmark page.

See the hypothesis feed

The people behind Cubrim

Two people work on the theory of universal data matrices.

P

Pavel Valentov

Founder, originator of the idea

Conceived the idea of universal data matrices and leads the development of Cubrim. He owns the algorithm architecture and the direction of the research.

E

Ekaterina Valentova

Co-author, aerospace engineer

Co-author of the "Valentov Universal Data Matrices". Her field is use-case analysis for bandwidth-constrained, high-latency channels, including interplanetary communication.

Cubrim is part of the Arcanada ecosystem.

Follow the race

The whole improvement process is open. Every idea, every measurement and every verdict is published as it happens.