Run-length encoding: Difference between revisions

m
Line 2,205:
 
<syntaxhighlight lang="easylang">
proc encodeenc in$ . out$ .
out$ = ""
for c$ in strchars in$
Line 2,220:
out$ &= cnt & c0$
.
proc decodedec in$ . out$ .
out$ = ""
for h$ in strsplit in$ " "
Line 2,229:
.
.
calls$ encode= input r$
print rs$
call decodeenc inputs$ rs$
print rs$
call dec s$ s$
print s$
#
input_data
WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
12W 1B 12W 3B 24W 1B 14W
 
</syntaxhighlight>
1,982

edits