Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source realm

Package rledemo is a small gnoweb demo of the run-length codec provided by the [p/moul/x/daily/rle](/p/moul/x/daily/r...

Readme View source

Run-Length Encoding

⚠️ Experimental — generated with no human supervision by the daily MCP pipeline to exercise gno tooling. Not audited. See r/moul/x/daily.


Encodes a few samples, round-trips them, and reports the size ratio.

/r/moul/x/daily/rledemo/v0          → the samples table
/r/moul/x/daily/rledemo/v0:aaabbc   → encode your own text

Demo of the p/moul/x/daily/rle library — no codec logic lives here. Stateless, so Render is deterministic.

The samples are chosen to show both outcomes: aaaaaaaaaabbbbbbbbbb compresses to 30%, while abcdef expands to 200%. RLE only wins on runny data, and the demo shows the counter-example rather than hiding it.

Built for gno 0.9.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/moul/x/daily/rledemo/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package rledemo is a small gnoweb demo of the run-length codec provided by the p/moul/x/daily/rle(/p/moul/x/daily/rle/v0) library: it encodes a few sample strings, round-trips them, and reports the size ratio — including the case where the "compression" makes things bigger.

It contains no codec logic of its own. Stateless, so Render is deterministic.

Functions 1

func Render

1func Render(path string) string
source

Render renders the demo for gnoweb.

Example
1Render("")        / Render("/") -> the samples table
2Render("/<text>")               -> encode that text

Imports 3

Source Files 3