 This is represented by the following JSP diagram.The run length encoder input

The second step is to describe the structure of the output.The run length encoder output can be described as zero or more pairs, each pair consisting of a byte and its count.