omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / exercises / run-length-encoding / run-length-encoding.om
| 1 | note Exercism-style exercise "run-length-encoding": https://exercism.org/tracks/python/exercises/run-length-encoding |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note encode writes the run-length encoding of s into o: each run of 2 or more equal bytes becomes its |
| 4 | note decimal count followed by the byte, a single byte stays as it is. decode reverses it. Both |
| 5 | note return the number of bytes written. |
| 6 | note Check it with: sh exercise.sh exercises/run-length-encoding |
| 7 | om2 |
| 8 | fn encode s view uchar * o edit uchar * to ulong |
| 9 | note replace this line with your solution |
| 10 | trap 13 |
| 11 | end |
| 12 | fn decode s view uchar * o edit uchar * to ulong |
| 13 | note replace this line with your solution |
| 14 | trap 13 |
| 15 | end |