Anonymous user
Run-length encoding: Difference between revisions
m
→{{header|zkl}}: update
(→{{header|Kotlin}}: (made example usable with https://github.com/dkandalov/rosettacode-kotlin)) |
m (→{{header|zkl}}: update) |
||
Line 4,069:
}</lang>
<lang zkl>fcn inflate(data){ //-->String
data.howza(3).pump(
fcn(c){ // if c==1, read n,c2 and expand, else write c
if(c=="\x01") return(Void.Read,2) else return(Void.Write,c) },
fcn(_,n,c){ c*n.toAsc() })
|