13_1.3.4 WebTech – Compression 3

A survey is carried out to look at the types of vehicle that travel down a stretch of motorway.

For each vehicle that passes by, a letter is entered into the system.

For a car ‘C’ is entered.

For a motorbike ‘M’ is entered.

For a lorry ‘L’ is entered.

For any other vehicle ‘O’ is entered.

It is decided to compress the data that has been generated.It is decided that Run Length Encoding will be used.

Show the result of using Run Length Encoding to compress the sequence:

CCCCOLLLCCCCCMOCCCCC

×