A joke, followed until it broke.
A hackathon toy turned a FASTA file into a PNG and noticed the PNG came out smaller. The idea underneath was real: an image codec's row filters are two-dimensional predictors, so the width you pick is a free parameter, and sweeping it detects tandem repeats. Following that all the way removed the codec from the answer.
One
What the statistic is looking at
Write a sequence into an image row by row. A PNG can subtract each row from
the row above before compressing — the Up filter. Choose a width
equal to the period of a tandem repeat and every row becomes a near-copy of the
row above, so the subtraction leaves almost nothing.

Notice what does not change. The raw stream deflates to 0.86 bits per base at one width and 0.86 at the other. Deflate finds this repeat from one dimension without any help from the layout. The 2-D arrangement changes the row difference, not the file size — and that turns out to be the whole story.
Two
The reversal
Three ways to measure the same sweep. png writes a real PNG at each
width. up fixes the Up filter and deflates the residual.
match throws the compressor away and counts positions where a byte equals
the byte w earlier.

The compressor was never doing the work. It was the lens that found the statistic. The framing this project is named after turns out to be scaffolding — and taking it away made the method faster, twenty times more tolerant of indels, and the only version that works on a real genome.
Three
Where it works, and where it stops
Planted arrays, 400 kb per cell, substitutions only. The boundary is a horizontal line: every period from 5 bp to 5000 bp is found at 65% divergence and none at 80%. Period does not enter into it.

Indels, not substitutions, are the real limit

Four
Real genomes
45 windows of 200 kb across T2T-CHM13v2 chr21:5–14 Mb — the
acrocentric short arm and the centromere — scored against UCSC's
simpleRepeat (Tandem Repeats Finder) and censat,
neither of which knows anything about this method.
| statistic | windows calling a period | agreement (25 annotated) | agreement (period ≥ 20 bp) |
|---|---|---|---|
match | 19/45 | 17/25 (68%) | 6/11 |
png | 4/45 | 1/25 (4%) | 1/11 |
up | 0/45 | 0/25 (0%) | 0/11 |

censat labels bsat_21_7 (beta satellite), 171 bp in the mon_21_* windows (alpha-satellite monomer), and multiples of 170 in hor_21_3, the higher-order array. up appears only in the legend — it calls nothing at all.A plant satellite, and a control that has to stay quiet

Five
What it is not
Most of what was learned here is negative, so it gets its own section rather than a footnote.
It is not a compressor
| input | v0.1 (base64) | v0.2 | gzip -9 | xz -6 | 2-bit + xz |
|---|---|---|---|---|---|
| sample.fasta, 611 B | 0.452× | 0.666× | 0.111× | 0.183× | 0.183× |
| CHM13 chr21 5–14 Mb | — | 0.214× | 0.253× | 0.184× | 0.172× |
The rewritten container beats gzip on the megabase inputs, but
that is the two-bit packing, not the layout — the same packer into xz
beats the PNG every time. And the 2-D layout never beat gzip on the same bytes,
at any width, for any period tested.
Things that looked like results and were not
- A phase diagram with no phase boundary. The first grid ran to 30% divergence and 900 bp and every one of its 70 cells was a hit. That is not a result, it is an under-ranged axis. It had to be re-ranged twice before anything failed.
- A global baseline made every short width periodic. Four letters mean a byte matches the byte two positions back about a quarter of the time, so every sequence “dips” below a global average at small widths. The detector had been scoring against a rolling local baseline all along; nobody noticed that was load-bearing until the statistic was ported to a browser and every puzzle level was solvable with the answer “2”.
- The smallest member of a harmonic family is not the fundamental. A noise-level dip at p/2 gets full harmonic support, because 2p, 3p and 4p are the real period and its harmonics. A 340 bp array was reported as 170 with a dip of 0.07 while 340 dipped 0.90.
- A finder detector that matched a template. It failed silently past ten degrees of rotation, because a rotated square fills less of its own bounding box — 0.49 straight, 0.32 at 17°, 0.25 at 45°. A topological test (one hole, 25/49 of the filled shape) is rotation-invariant by construction and took recovery to 12/12 across a full turn.
- A container detector that catches containers. It catches high-entropy containers. A satellite array two-bit-packed into a PNG comes out at 0.13× and its pixels are nowhere near random, so the rule never fires. Portrait mode evades it too, by looking like a picture.
Six
The rest of what was built
A container that is a container
No base64, two-bit DNA packing with lossless side streams for headers, newlines, N runs and soft-masking case, length and SHA-256 in a tEXt chunk, strict decoding. 0.214× on chr21.
A portrait that still decodes
Payload in the low nibble of every channel, a GC-and-compressibility rendering in the high nibble, Hilbert-ordered so neighbouring pixels are neighbouring sequence. Costs 1.16–1.48× the plain container.
Details →Provenance inside a figure
The git commit, the command line and the input checksums, hidden in a plot's low bits, so a figure carries its own provenance through the one channel that always survives — somebody pasting it into a slide.
Details →A detector for both
40/40 containers flagged, 0/119 real figures falsely flagged. A manifest-sized LSB payload is invisible (AUC 0.41); a full cover is not (AUC 0.92).
Details →A FASTA you can print
Reed–Solomon over GF(256) with interleaving and four finder squares. 73 of 108 photographed trials recovered; the boundary is roughly blur σ ≲ 0.3 × module pitch, and rotation is not a factor.
Details →Proving a repeat without showing the genome
A match count is one equality per base, so unlike a compressed size it can be arithmetised. The relation, a Merkle commitment and a sampling audit are implemented and tested; the SNARK is written and unproven.
Details →
The claim the proof would make
I know a sequence S of n bases whose Merkle root is R,
such that at least k positions satisfy S[i] = S[i − w].
For a satellite array that is a statement about repeat structure. At w = 3 it is a statement about a trinucleotide expansion.
The SNARK. The circom circuit is written and its constraints counted, and it has not been compiled or proven — this machine has no circom. And a proof that some sequence with root R has k matches says nothing about where that sequence came from; the commitment has to be bound to a sequencer signature or a lab attestation. The cryptography is the easy half.
Seven
Play it
The same statistic as a puzzle. You get a sequence and a budget of probes;
each probe lays the sequence out at a width you choose and tells you what it
compressed to. Find the period. It runs on the browser's own
CompressionStream, so a width that snaps in the game snaps in the
Python.
Building it is what exposed the global-baseline bug above — every level was solvable with the answer “2”, and it took a second implementation to see it.
Eight
Method
Every number on this page is read out of results/ by
site/build_site.py,
which generates the page. None of it is typed by hand, so it cannot drift from
the experiments. Colour tokens are contrast-checked at build time by
site/palette.py, which
refuses to build if a token that carries meaning falls below its WCAG floor.
Eleven experiments, each one file, each writing a TSV or JSON that these figures and numbers come from. 107 tests, including a suite that ports the puzzle's random number generator into Python so its levels cannot silently become unsolvable.