Algorithms for the Communication of Samples