Data Compression Algorithm
To make the best use of storage, radar rays are compressed before being inserted into the file.
The compression algorithm is 16-bit word based, and removes runs of zeros.
This complements the signal processor, which zeros data that does not meet the threshold requirements in effect.
Runs of one or two zeros are not removed because there is no benefit. The data field starts with a compression code value.
The code either indicates the number of zeros that were skipped, or the number of data words that follow. In the case of a zero skipped code, it is immediately followed with another code value. In the case of a data code, the next code follows the data.
| MSB | Low-bits | Meaning |
|---|---|---|
| 0 | 0 | <unused> |
| 0 | 1 | End of ray |
| 0 | 2 | <unused> |
| 0 | 3 ... 32767 | 3 ... 32767 zeros skipped |
| 1 | 0 | <unused> |
| 1 | 1 ... 32767 | 1 ... 32767 data words follow |
