LZW compression: Difference between revisions

Content added Content deleted
m (→‎version 2: corrected a misspelling.)
Line 4,432: Line 4,432:
LZWd: procedure; parse arg x y,,@.; #= 256 /*LZW decompress algorithm.*/
LZWd: procedure; parse arg x y,,@.; #= 256 /*LZW decompress algorithm.*/
do j=0 for #; @.j= d2c(j); end /*j*/
do j=0 for #; @.j= d2c(j); end /*j*/
$= @.x; w= $ /*#: is the dictionay size*/
$= @.x; w= $ /*#: the dictionary size.*/
do k=1 for words(y); z= word(y, k)
do k=1 for words(y); z= word(y, k)
if @.z\=='' | @.k==" " then ?= @.z
if @.z\=='' | @.k==" " then ?= @.z