This compression / decompression library is for decompressing data compressed with a run-length compression tool provided separately.
Run length compression tool CMPRUN.EXE
1.2 Compression method
Unique discrepancy processing is added. In a simple run-length algorithm, mismatched sequences degrade compression, so mismatched sequences are processed together.一致 Match series is expressed by run length and value. A non-matching sequence is expressed by a non-matching sequence length and a non-matching sequence value (uncompressed data).
∙ In order to distinguish between codes representing matched sequences and codes representing unmatched sequences, the length of unmatched sequences is described as a negative value (2's complement).
∙ Inputting a short run length breaks the discrepancy sequence and degrades the compression rate, so the end condition for discrepancy sequence is devised.
[Define unmatched series]
Unmatched series is defined by the following start and end conditions.