FA FA FA FA FA CD FA FA FA FA 12 00 CD FA FA FA 12 is such a sequence in hexadecimal notation. Using variable length coding, we get: FF 01 FA CD CD FF 00 FA 12 00 CD FA FA FA 12

FA FA FA FA is the redundant part of the sequence which we denote as FF 00 FA

where FA FA FA FA FA - as FF 01 FA

where FF is no idea how to correctly name (word, prefix, pointer) to the fact that there was a redundant part of the sequence and we changed it to reduce the amount of data.

where 00 means 4 repetitions.

a 01 = 4 + 1

FA is a hexadecimal value that is redundant

in relation to 18 values ​​before coding and 15 after 18/15 = 1.2. 1.2 bytes of the original data stream (1–15 / 18) * 100 = Compression by 16.67% arrive at 1 byte of the archived data stream.

Am I thinking correctly?

redundant sequence is considered if the value is repeated 4 or more times? I can not find information on this topic (

9A 9A 9A 9A 9A 9A B8 50 F7 F7 9A 9A 9A CC CC CC B8 F7 CC 48 48 48 48 9A after compression should be so? AA 03 9A B8 50 F7 F7 AA 00 9A CC CC CC CC B8 F7 CC 48 48 48 48 9A?

  • In general, there are quite a few compression algorithms. in the fact that you brought, of course it is worth counting repetitions from 4 times, otherwise this method will transform shorter into longer ones - Mike
  • 2
    @Mike thanks. Just found the right information. The encoding is called RLE - Run Length Encoding - Volodymyr Samoilenko

0