LIGHT·LAYERED

LIGHT, layered: five folds, measured

One lossless codec that squeezes data along five dimensions at once — the byte, the word, the shape, the prediction, and what both ends already share — tested on five kinds of the estate's real data it had never seen. Then the same substance one level up: a verified rule stored as one of these frames is data when kept, and a decision when settled; a node is a stack of them that answers with no model in its loop.

reading the record… claims sealed before code lossless, checked by SHA-256 MIT

Try it on your own textSee the ladderRead every verdict
…best full-stack ratio
…the flat layer (D1) alone, best type
…15× on any type?
…items decoded byte-identical
…mutants killed by the gate
…

Words on this pageEight words, in plain English

Ratio (×)
Original size divided by squeezed size. 4× means a quarter of the bytes. Every ratio here counts every header byte, and is pooled: add up the original sizes of all the held items of a type, add up the sizes of all their frames, and divide the first by the second.
Layer, dimension, fold
A family of guesses about the next byte. D1 guesses from how often each byte occurs; D2 from the word being written; D3 from the field or line it sits in; D4 from the last few bytes and long repeats; D5 from what both ends already hold. The fold depth is how many layers a frame used.
Seed
What both ends already share, taught to the codec before the first byte. It can grow: every item two ends exchange can be added to it.
Cold frame and whisper
A cold frame (D1 to D4) needs nothing shared and decodes anywhere. A whisper (all five) needs the same seed at both ends; a frame names its seed, and a reader with a different one refuses it.
Lossless
What comes out is exactly what went in, byte for byte, checked by SHA-256.
Sealed, held out
The claims were committed before the code; the instrument was frozen by hash before any held item was read. Held items are dated after the cut, never seen by any tuning.
Mutation gate
A test of the tests: a tool plants hundreds of small bugs in the code, one at a time, and the test suite must catch every one. Here … planted bugs were caught, with none excused, and CI repeats it on every change.
Pattern, node, settle
A pattern is a verified rule (WHEN word THEN family). Settling it against a case gives its decision or "unknown". A node is a stack of patterns; the first that fires answers.

Start hereHow to use this page

  1. Try it. Paste any text in Try it. The same codec as the measurement runs in this tab and shows the size at each fold depth, and checks the round trip.
  2. Read the ladder. The ladder shows, for each of the five data types, what each layer added, beside gzip, Brotli, zstd and LIGHT v1.
  3. Check the two big ideas. The spec claimed (1) that each layer's gain multiplies the others', and (2) that the more two systems share, the smaller their messages get. Do the folds multiply? and The seed grows test each one directly.
  4. See data become code. Stacked shows a verified rule as one frame, decoded and settled, and a node answering with no model.
  5. Verify, don't trust. Receipts lists every sealed claim with what was measured, held or failed, and links the raw record.

The ladder · L3, L9, L10, L12What each layer adds, per data type

Each held item coded on its own, at each fold depth. The bar is the pooled ratio; the number on each step is that layer's fold (this depth ÷ the one below). Lines: the standard coders on the same items.

TypeItemsD1+D2+D3+D4+D5 (full)gzip-9Brotli-11zstd-19zstd + same seedLIGHT v1

Thesis 1 · L7Do the folds multiply?

The spec said folds multiply across dimensions. If they did, adding all five layers would give at least D1 × each upper layer's gain measured on its own. This compares that product with what the full stack actually gave.

TypeD1D2 aloneD3 aloneD4 aloneD5 aloneProduct if they multipliedFull stack, measuredVerdict

Thesis 2 · L11, S6The seed grows: does sharing more make messages smaller?

Left: the full stack on the same held items, with a seed of the most recent 0, 64 KiB, 256 KiB, 1 MiB and 4 MiB of what came before. Right: two nodes that start sharing nothing, exchange the held items in time order, and both add each one to their seed.

The pair · first third → last third of the exchange

TypeNo seed64 KiB256 KiB1 MiB4 MiB (all)

Try itYour text, through the layers, in this tab

The same fold.mjs as the measurement. Nothing you type leaves this tab. The seed here is the most recent public prose and records the measurement taught (it takes a few seconds to teach).

Sizes

Press Fold it.

Stacked LIGHT · S1, S3, S4, S5Stored it is data, settled it is a decision

The estate's own pattern library, over Kar's repo-to-family decisions for its public repositories. Every rule had to pass the library's gate; the model only proposed. Each kept rule is one cold frame: decode it and you read the rule; settle it against a repository's words and it decides, or says unknown.

The stack · every rule, as a frame

Ask the node · no model in its loop

Capability by stack depth (S4), on the slice the gate never saw

Who proposed, what the gate kept (S5)

ReceiptsEvery sealed claim, held or failed

ClaimSaid before measuringVerdictMeasured

Raw: the record · public records pack · public prose pack · the mutation gate · claims L1–L12 · claims S1–S6 · SEAL 2. Private types publish counts and a snapshot hash, never text.

How it worksOne stream, five families of guesses, one coder

Traced from the real run

…

  1. A frame's header says which layers it used (a mask), its table size, the seed's id if it used one (the first 4 bytes of a SHA-256 chain over everything the seed was taught), the length, and a check: the first 4 bytes of the SHA-256 of the original. The decoder recomputes it and returns nothing if it differs.
  2. A cold frame is used like gzip: sender and receiver need only this codec. A whisper is for two systems that already share records (a seed) and keep it in step.
  3. Prediction is compression. For each bit, the probability the layers give it decides how many bits it costs. Example: after "url":"https://sjgant80-hub.github.io/ the field layer and the repeat model are almost sure what comes next, so those bytes cost a fraction of a bit each; a new repository name costs nearly full price. A 99% guess costs 0.015 bits; a wrong one costs many.
  4. The seed is the same model taught the shared material first. A frame names it; the reader must hold the same one or it refuses.
  5. Drift: if the reader's seed differs, the sender drops to the cold layers. Always correct; just less squeezed.

BlueprintBuilt organ by organ

layered/src/fold.mjs

The codec: five layers, one mixer, one coder, seeds that grow, frames that name their layers and seed. Pure, integer-only, mutation-gated.

layered/src/settle.mjs

Levels 2-3: a rule as one frame, settled to a decision; a node as a stack. Imports the codec and nothing else.

layered/src/verdict.mjs

Every verdict computed from the record's numbers alone, so CI can recompute them.

tools/gather, lab, measure, stack

The sealed material rule, one type's measurement (shared by the run and CI's re-derivation), the one run, and the pattern-library run.

.github/workflows/layered.yml

Tests, the mutation gate on all three kernels, and a full re-derivation of the public types from the committed packs.

This page

Reads the record; runs fold.mjs and settle.mjs in the tab. No number on it is typed in.

Honest scopeWhat this is, and what it is not

For your businessWhat it does for a team that stores and sends records

CEO

Your own data format, measured against the standard tools on your own traffic, owned outright (MIT, no licence fee).

CFO

Storage and transfer bills scale with bytes. Type your monthly bill below; the saving is computed from the measured ratio for the data type you pick.

COO

One file to deploy, runs anywhere JavaScript runs (servers, browsers, edge). No service to operate.

CTO / CISO

Lossless with a check on every frame; a frame for the wrong seed is refused, never misread; runs where the data is, nothing sent out; mutation-gated code you can audit.

Your saving, from the measured ratio

Computed in this tab: bill × (1 − frame bytes ÷ compared bytes), from the record's pooled totals for that type. Your own data may differ: measure it before relying on it.

What it costs

Security model, plainly

Data protection

The codec runs where the data already is and sends nothing anywhere. It is lossless, so it does not change what the data says or how it may be used; a frame is a smaller copy of the same personal data, and a seed is made of your own records too. Treat both exactly as the data they hold: same encryption at rest, same access, same retention and deletion. Your data protection officer still signs off; this page is not legal advice.

Risks, answered straight

The case for the board

…

AdoptionRolling it out

  1. Measure first. Run the same ladder on a sample of your own records; keep it if it beats what you use now.
  2. Start cold. Cold frames (D1 to D4) need nothing shared: drop them in where you gzip today.
  3. Grow a seed. For two systems that exchange the same kinds of records, version a seed from the records both already hold; frames name it.
  4. Let it grow. Both ends add what they exchange; ids stay equal; a mismatch falls back, never corrupts.
  5. Stack rules. Decisions you make repeatedly can live as verified rules in the same format, answering before any model is asked.

White paperFive folds and a stack, measured once

1 · The question

LIGHT v1 measured … on its own held JSON (median, its record). The spec argued that number is a flat ceiling and that five dimensions of compression, stacked, multiply towards 15× and beyond. Two theses follow: the folds multiply, and the ratio grows as two ends share more.

2 · Method

Claims sealed before code. Five data types (agent messages, memory, the call book, public JSON records, public prose); everything dated before 5 November 12:00 UTC is the seed side, everything after is held, read first by the measurement. Each held item coded on its own at each fold depth, every header byte counted, every frame decoded and SHA-checked, against gzip, Brotli, zstd (alone and given the same seed) and LIGHT v1. A one-to-one correspondence between layers and families of guesses in a single context-mixing coder. One level up: the estate's pattern library, its gate unchanged, measured on a slice nothing had seen.

3 · Results, from the record

    4 · What it means

    …

    5 · Limits

    One estate's data over a few days of held items; one machine; JavaScript speed; the public types are re-derivable by anyone, the private ones only where they live (their snapshot is named by hash).

    FAQQuestions

    Did it reach 15×?
    …
    Was the 75× in the spec real?
    It was an assumed product of guessed per-layer gains, not a measurement. The measured answer, per type and depth, is the ladder, and the multiply test is here.
    Can I re-run it?
    The public types, completely: CI re-derives every public number from the committed packs on GitHub's machines. The private types (the estate's own messages, memory and call book) only where they live; the record names their snapshot by hash.
    Does the node call a model?
    Not when it answers. The model (the local qwen2.5:7b) only proposed rules, offline; the library's gate decided which to keep. The node's code imports the codec and nothing else, and a test counts zero calls out of it.
    Does anything I type leave this tab?
    No. The page's security policy blocks every connection except its own files.
    Whose work is it?
    Powered by the Konomi architecture, created by Thomas Frumkin. Built on LIGHT v1 in this repository. Supplied by AI Native Solutions; support and terms agreed per deployment. MIT licence.