1. A multipoint geostatistics computer-implemented method for modeling of discrete properties, said method comprising: acquiring by a computer software program a training image made from at least a one dimensional array of discrete property values; said values depicting a spatial relationship and variability considered to be typical of a n-dimensional surface to be modeled; constructing a search tree, the tree representing a probability of occurrence of combinations of values of the discrete property value, the construction being performed by counting these occurrences in the training image; wherein non-branching sequences of the search tree are compressed to what essentially amounts to a single node, by keeping only relevant information the sequences contain; and wherein the relevant information comprises a number of replicates at a level of the node and the non-branching sequences below the node.