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

rledemo/v0 package

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.

Function

Render

func Render(path string) string

Render renders the demo for gnoweb.

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

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/rledemo/v0.Render()"

Result