LZW compression: Difference between revisions
Content added Content deleted
m (→version 2: added a blank line to the output.) |
m (→version 2: aligned statement.) |
||
Line 4,900:
$$$= '"There is nothing permanent except change." ─── Heraclitus [540 ── 475 BCE]'
parse arg text; if text='' then text= $$$ /*get an optional argument from the CL.*/
say 'original text=' text
cypher= LZWc(text) /*compress text using the LZW algorithm*/
say 'reconstituted=' LZWd(cypher) /*display the reconstituted string. */
|