Run-length encoding: Difference between revisions

Content added Content deleted
Line 2,205: Line 2,205:


<syntaxhighlight lang="easylang">
<syntaxhighlight lang="easylang">
proc enc in$ . out$ .
proc encode in$ . out$ .
out$ = ""
out$ = ""
for c$ in strchars in$
for c$ in strchars in$
Line 2,220: Line 2,220:
out$ &= cnt & c0$
out$ &= cnt & c0$
.
.
proc dec in$ . out$ .
proc decode in$ . out$ .
out$ = ""
out$ = ""
for h$ in strsplit in$ " "
for h$ in strsplit in$ " "
Line 2,229: Line 2,229:
.
.
.
.
call enc input r$
call encode input r$
print r$
print r$
call dec input r$
call decode input r$
print r$
print r$
#
#
Line 2,239: Line 2,239:


</syntaxhighlight>
</syntaxhighlight>



=={{header|Elena}}==
=={{header|Elena}}==