Understanding Compression by Colt McAnlis

Understanding Compression by Colt McAnlis

Author:Colt McAnlis
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2016-07-11T00:00:00+00:00


Applying delta coding here didn’t produce a less dynamic range, and we still need to encode the entire set with log2(maxValue).

But things could become even worse than that. Consider this sequence of woe:

[1,3,10,8,6]

Perform Delta coding → and cry:

[1,3–1,10–3,8–10,6–8] → [1,2,7,–2,–2]

In this set, we have subsequent values that are larger than their predecessors, and we end up with negative values in the transformed set. The largest positive value is 7, so we could store the positive values as LOG2(7) = 3 bits each. Sadly though, we now need to represent those negative values, meaning that we need to store an extra bit per symbol, requiring 4 bits.

These kinds of situations are extremely common and are exactly where delta coding falls over and becomes less effective. But there’s a whole slew of modifications you can apply to make this algorithm more robust, regardless of the data to which you’re applying it.

Let’s take a look at a few simple examples.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.