UP   PREV   NEXT (pacifier)

Suppose we are compressing a stream of 16 bit symbols that are 90 percent zero...

  • We'll use a single '0' to represent a whole symbols of zeros.

  • We'll use a single '1' followed by the sixteen digits to represent non-zero values.

    Compression factor: (0.9 * 1 + 0.1 * 17) / 16 = 16.25 percent.