1. Apparatus for compressing data having a arbitrary probability distribution, the apparatus being configured to obtain a set of samples from said data, create a phase distribution model of said sample data set, and perform a search function adapted to select the elements forming said phase distribution model by evaluating one or more values of the elements within the model and determine those that best fit the distribution of the example data set.