Search for a tool
RLE (Run-Length Encoding)

Tool for encoding / decoding with Run-Length Encoding. RLE is a very basic data compression algorithm that consists in describing a string according to its repetitions.

Results

RLE (Run-Length Encoding) -

Tag(s) : Compression

Share
Share
dCode and you

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our community Discord for help requests!


Thanks to your feedback and relevant comments, dCode has developped the best RLE (Run-Length Encoding) tool, so feel free to write! Thank you !

RLE (Run-Length Encoding)

RLE Decoding



Parameters





See also: Conway Sequence

RLE Encoding



Parameters





Tool for encoding / decoding with Run-Length Encoding. RLE is a very basic data compression algorithm that consists in describing a string according to its repetitions.

Answers to Questions

How to encrypt using RLE compression ?

with Run Length what matters is the length of repetitions in a text.

The text is scanned to find sequences of identical characters, then the character and the number of repetition are noted in the sequence.

Example: DDDDDCCCCOOODDE can be described by 5 times the character D followed by 4 times the character C, etc. The message can therefore be compressed as D5C4C3D2E1 (10 characters instead of 15).

Most of the time, the compressed message will have less character than the original message, hence the compression.

It is possible to encode by inverting the counts and the characters.

Example: 5D4C3C2D1E is then equivalent to D5C4C3D2E1

How to decrypt using RLE decompression?

The RLE decompression consists in browsing the message formed of pairs (character, number of repetition) and writing the equivalent text by writing the character the corresponding number of times.

Example: D5C4C3D2E1 decomposes into D5, C4, O3, D2, C1 and repeats the characters the correct number of times: D5 => DDDDD > CCCC, etc. To get DDDDDCCCCOOODDE

To apply the method with numbers, use a separator, else 11111111111122 would become 11222. Which may be repeated 1222 times, or 22 times the number 2, etc.

How to recognize a RLE ciphertext?

A message compressed with RLE is composed of pairs (Character-Number) or triples (Character-Separator-Number).

BMP and PCX image formats use RLE to reduce file size.

Source code

dCode retains ownership of the online 'RLE (Run-Length Encoding)' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for RLE (Run-Length Encoding) download for offline use on PC, tablet, iPhone or Android !

Need Help ?

Please, check our community Discord for help requests!

Questions / Comments

Thanks to your feedback and relevant comments, dCode has developped the best RLE (Run-Length Encoding) tool, so feel free to write! Thank you !


Source : https://www.dcode.fr/rle-compression
© 2020 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
Feedback