Encoding data by first performing a transformation of predicted data and
input data, and then performing a subtraction of the resulting outputs.
In an embodiment, the prediction approach is chosen such that fewer
elements of different values (compared to a number of elements in the
input data) are generated, and the different values are generated in a
predictable position. The transformation approach is chosen such that the
output expressly represents variations in the input data as well as
satisfies a distributive property. The decoding may be performed based on
the same concepts. As a result, the data can be encoded and/or decoded
efficiently.