File Exchange

image thumbnail

RLE de/encoding

version 1.0.0.0 (545 Bytes) by Stefan Eireiner
A simple m-file which (de)compresses your data using RLE.

19 Downloads

Updated 24 May 2004

No License

A simple (de)compression program using Run Length Encoding.

Compression is done that easy:
compressedData = rle(originalData);

Decompression:
originalData = rle(compressedData);

Cite As

Stefan Eireiner (2020). RLE de/encoding (https://www.mathworks.com/matlabcentral/fileexchange/4955-rle-de-encoding), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (26)

aslan memo

this not code for rle image compress

octave314

Great code. Thank you for sharing.

Sharo Chen

Noir

can anyone specifiy how to input original data @@

I am not able to view or download the file. I am getting "invalid menu handle". Kindly advise. This is 1st time I am attempting file exchange.

x is the argument of the function

mnaa

pleeeeeeaze reply to me
pleaze

mnaa

it appear the variable x is not define, please help me

Zahra M

Great and Thanks

OLFA MOUSSA

thx

Ram prasad

zhang yong

Thurein Oo

lot thanks

siva kumar

good.......

xiaofan feng

brilliant, though need specified by oneself.

Shiva Krishna

Deserves more than 5 rating!!!

Kallol Roy

But when I'm decompressing the compressed image I'm getting back an one dimensional row vector. How can this prb be solved?

I used binary image for tedting.

Zhuo Hao

It's short but efficient.

Saeed Mozaffari

simple and efficient

Jeffrey Marten Gillmor

Simple, yet very quick and effective, thanks

Gabriel Peyré

Very nice compact code. One then just need to use an entropy coder to compress the runs length.

Janet Khuu

A note that this function does not find the number of zeros in a run (if used for JPEG coding); otherwise, this is great.

lele zhou

good, thanks

Bush George

Thanks!

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux