Run-length encoding: Difference between revisions
→{{header|J}}: simplify and speed up rle
(added PowerShell) |
(→{{header|J}}: simplify and speed up rle) |
||
Line 543:
NB. Run-length encode and decode...
rle=
rle 'WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW'
12W1B12W3B24W1B14W
Line 551:
WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
</lang>
=={{header|Java}}==
<lang java>import java.util.regex.Matcher;
|