[prefix sharing] Added method for computing the optimal redistribution of one array to another.
[prefix sharing] Added methods for encoding / decoding a prefix shared array.