There are the following two types of codes. The two are distinguished depending on whether the run length is positive or negative.
Figure 1.3 Run-length compressed file format