YLK1 · next-occurrence link codec

Link chase lab

A rebuild of the storage scheme in US 5,153,831, filed 1990 by Peter N. Yianilos for Franklin Electronic Publishers — the handheld electronic Bible. A searchable word is never written into the stream. Each occurrence stores only the distance forward to the next occurrence of the same word; the last one stores the lexicon row. Every occurrence sits on one chain that ends at the lexicon, so the stream is simultaneously the text and its inverted index. Nothing is stored twice.

Paste text, encode it, then click any cell to light up its chain. The RPR1 lab is the Re-Pair codec next door; section 02 prices both.


01 Input 0 bytes

0 is FIG. 2: every term linked, punctuation included. Above that, FIG. 3 — punctuation and function words are written directly and leave the lexicon. Ordinary vocabulary is never a candidate, so "God" and "LORD" stay searchable at any setting.

Every Nth occurrence also carries its lexicon row, capping the read-mode chase. 0 disables it; the patent suggests 1000. The box accepts values past the slider.

The K hottest direct terms each get their own code table, chosen by the symbol before. What follows "and" is not what follows a comma. The only knob here that costs memory: the reader holds K + 4 decode tables. 0 is one table for everything. Huffman, unsplit.

The patent leaves this to its Appendix A, which is not public. Huffman is the fair comparison; the varint is the honest floor.

Deltas then count search entries only, so they shrink; the cost is one place holder per term.


02 Result

Nothing encoded yet. Paste text and press Encode.