Skip to content

Online Codes

Rateless erasure codes with locally generated check blocks and staged probabilistic message recovery.

Version
v2 · 2026-11-14 · History
Domain-specific #
11099
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomains
Coding Theory, Erasure Codes, Fountain Codes → Computer Science & Software Engineering
Aliases
Maymounkov online codes

Core Idea

Online codes, in Maymounkov's named construction, are a particular rateless erasure-code family. A finite message is divided into blocks and processed by an outer code into a slightly larger composite set. The encoder can then create successive check blocks on demand, each formed from a randomized sparse XOR of composite blocks. There is no fixed total codeword length in advance, and generating one check need not require generating previous checks. These are defining differences from a conventional fixed-rate erasure code; ratelessness alone does not identify this construction.

The receiver uses checks whose unknown-neighbor count has fallen to one, then propagates recovered blocks through the sparse graph. The inner process may leave a small residual; the outer code makes full message recovery possible under the model. The original paper proves parameter-dependent near-linear overhead and probabilistic recovery; no arbitrary tiny fraction of checks can reconstruct a larger unknown message. Its reported Java experiments are an attested implementation of the code, whereas peer-to-peer file dispersal is presented in the paper as a motivation and proposed use, not evidence of deployment.

How would you explain it like I'm…

Endless Hint Cards

Imagine sending a big puzzle to a friend, one piece at a time, but some pieces get lost on the way. With online codes you can keep making new mixed-up pieces forever. Once your friend catches a bit more pieces than the puzzle started with, no matter which ones, they can almost always put the whole puzzle together.

Rebuild From Mixed Pieces

Online codes are a clever way to send a message so that it still arrives even if some parts get lost. The message is cut into blocks, and a few extra helper blocks are added. Then the sender can keep making new check blocks forever, each one made by mixing a few random blocks together, with no set limit on how many. The receiver starts with check blocks that have only one unknown piece, solves that piece, and uses it to unlock more. A final helper step fills in any last missing pieces. You need a bit more than the original amount of data, not less.

Rateless Sparse-XOR Erasure Codes

Online codes, designed by Maymounkov, are a kind of rateless erasure code, a way to protect data against lost pieces where the sender can produce an unlimited stream of extra pieces. The message is split into blocks, and an outer code first adds a few extra blocks to make a slightly bigger 'composite' set. The encoder then makes check blocks on demand, each the XOR (a bit-by-bit combination) of a small random set of composite blocks; there is no fixed total length, and making one check does not require making earlier ones. The receiver repeatedly finds a check with only one unknown block, recovers that block, and spreads the result through the connections. This inner process may leave a few blocks unrecovered, and the outer code fills the gap. Recovery is probabilistic and needs slightly more checks than the message size; you cannot rebuild a message from only a tiny fraction of that.

 

Online codes, in Maymounkov's named construction, are a particular family of rateless erasure codes. A finite message is divided into blocks and passed through an outer code to form a slightly larger composite set; the encoder then generates check blocks on demand, each a randomized sparse XOR of composite blocks. There is no fixed total codeword length, and generating one check does not require generating earlier ones, which distinguishes them from conventional fixed-rate erasure codes; ratelessness alone, however, does not identify this construction. Decoding is a peeling process: any check whose count of unknown neighbors drops to one reveals that block, which is then propagated through the sparse graph to reduce other checks. The inner process may leave a small residual of unrecovered blocks, and the outer code makes full recovery possible under the model. The original paper proves parameter-dependent, near-linear overhead with probabilistic recovery, so some excess of checks over message blocks is always needed. Its Java experiments are an attested implementation, while peer-to-peer file dispersal appears in the paper as a motivation and proposed use, not as evidence of deployment.

Scope of Application

These comparisons require the original two-stage code and its stated recovery assumptions.

  • Unknown-loss communication. Generate additional checks without precommitting to one erasure rate.
  • Multi-source file research. Reason about combining independently generated checks under the paper's assumptions.
  • Coding-theory comparison. Separate local generation, outer completion, and overhead from generic ratelessness.
  • Implementation evaluation. Compare actual test overhead and runtime with theorem limits without treating them as channel-universal.

Clarity

An online code uses outer auxiliary blocks plus locally generated rateless XOR checks; after enough are received, inner peeling and outer completion recover the source with a stated probability. LT codes are the closest named rateless neighbor but need not share this construction. Fixed-rate codes preselect a finite expansion, and an arbitrarily small fraction of checks cannot determine an n-block message. The 2002 Java tests support a research implementation, not a documented peer-to-peer deployment.

Manages Complexity

The name compresses a sparse random graph, unbounded check generation, inner peeling, and outer completion into one code family. That simplifies analysis of unknown erasure rates, but conceals the assumptions behind probability of recovery and the difference between asymptotic overhead, one implementation's measurements, and real-channel performance. Those layers must be reopened before transfer.

Abstract Reasoning

  1. Specify source-block count and the loss model.
  2. Identify the outer composite-block transformation.
  3. Check how each on-demand XOR block chooses degree and neighbors independently.
  4. Trace when a received check becomes solvable and how recovery propagates.
  5. State the received-check threshold, failure probability, and whether evidence is theorem, experiment, or deployment.

Knowledge Transfer

The on-demand-check idea can inform file dispersal and unknown-loss channels, but Maymounkov's exact degree distribution, overhead bound, and outer-code guarantee transfer only under their assumptions. An LT or Raptor code shares fountain behavior without thereby becoming this online-code construction, and an observed Java test does not certify an untested network.

Neighborhood in Abstraction Space

Online Codes sits in a crowded region of the domain-specific corpus (40th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Memory Storage, Retrieval & Encoding (9 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14