NRL is a variation of Run-Length Encoding that is used often in the background images of both Rescue Team and Explorer titles. There are some variations, but this page describes its purest form and the most common variation.
NRL uses runs of 3 types- null, repeat, and literal. The type and length are packed into control bytes.
|0x00-0x7F||(control) null bytes|
|0x80-0xBF||The following byte (control-0x7F) times|
|0xC0-0xFF||The following (control-0xBF) byte|
Pair-24 is a way of packing two 12-bit values into 3 bytes.
In this form, null runs output two null values instead of a null byte while repeat and literal runs read/output value pairs instead of bytes.
Packing is as follows:
1111 1111 2222 3333 4444 4444
1- The lowest 8 bits of the first value
2- The lowest 4 bits of the second value
3- The highest 4 bits of the first value
4- The highest 8 bits of the second value