Sha256: c058b59cce55bea1ab948736abbfd4061b558a33383adba2545bc51b336396a5

Contents?: true

Size: 840 Bytes

Versions: 83

Compression:

Stored size: 840 Bytes

Contents

Implement run-length encoding and decoding.

Run-length encoding (RLE) is a simple form of data compression, where runs
(consecutive data elements) are replaced by just one data value and count.

For example we can represent the original 53 characters with only 13.

```
"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"  ->  "12WB12W3B24WB"
```

RLE allows the original data to be perfectly reconstructed from
the compressed data, which makes it a lossless data compression.

```
"AABCCCDEEEE"  ->  "2AB3CD4E"  ->  "AABCCCDEEEE"
```

For simplicity, you can assume that the unencoded string will only contain
the letters A through Z (either lower or upper case) and whitespace. This way 
data to be encoded will never contain any numbers and numbers inside data to 
be decoded always represent the count for the following character.

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
trackler-2.2.1.39 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.38 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.37 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.36 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.35 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.34 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.33 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.32 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.31 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.30 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.29 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.28 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.27 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.26 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.25 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.24 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.23 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.22 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.21 problem-specifications/exercises/run-length-encoding/description.md
trackler-2.2.1.20 problem-specifications/exercises/run-length-encoding/description.md