Jump to content

Run-length encoding: Difference between revisions

m
Line 2,205:
 
<syntaxhighlight lang="easylang">
procfunc$ encrlenc in$ . out$ .
out$ = ""
for c$ in strchars in$
if c$ = c0$
Line 2,219 ⟶ 2,218:
.
out$ &= cnt & c0$
return out$
.
procfunc$ decrldec in$ . out$ .
out$ = ""
for h$ in strsplit in$ " "
c$ = substr h$ len h$ 1
Line 2,228 ⟶ 2,227:
.
.
return out$
.
s$ = input
print s$
enc s$ = rlenc s$
print s$
dec s$ = rldec s$
print s$
#
2,058

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.