RLE ( Run Length Encoding ) with Matlab

Run Length Encoding (RLE) is a simple and popular data compression algorithm. It is based on the idea to replace a long sequence of the same symbol by a shorter sequence and is a good introduction into the data compression field for newcomers.
The sequence of length l of a repeated symbol 's' is replaced by a shorter sequence, usually containing one or more symbols of 's', a length information and sometimes an escape symbol.
RLE algorithms differ from each other mainly in three points: the threshold t, the marking of the start of a run and the coding of the length information. If l is smaller than t, the run stays unchanged, and if l is greater or equal t, the run is replaced. The start of a run can be indicated by a threshold run or an escape symbol 'c'. If a threshold run is used the start is characterized by a small sequence of 's', which has a length greater or equal than t. If an escape symbol 'c' indicates the start of a run, 's' is normally put behind 'c' in order to characterize the run symbol. 'c' must not be an element of the alphabet or occurrences of 'c' have to be coded in a way, that they are not mixed up with the start of a run.for example coding with Matlab

Post a Comment

0 Comments