Data-occurrence information for data compression
A computerized method for encoding or compressing a file, said data occurrences of data values generated for coding the file, comprising the steps of: (A) dividing the file into a plurality of stacks; (B) determining the occurrence of data values in a first data stack; (C) determining occurrence count information for at most a first number (M) the most frequent data values in the data stack, the occurrence count information indicates the most common data values and their occurrence numbers; (D) generating at least a first histogram with a second number (N) of intervals for the rest of the data values in the data stack; (E) determining the occurrence of data values in a further data stack; (F) determining occurrence count information most common for most a first number (M) data values into the further data stack, wherein the occurrence count information indicates the most common data values and their occurrence numbers; (G) generating at least one other histogram with a second number (N) of intervals for the rest of the data values in the data stack; (H) combining the occurrence count information of the further data stack with the occurrence count information of the first processed data stack by respectively adding the occurrence numbers for elements with the same value; (I) merging the histogram of the further data stack with the histogram of the first processed data stack by adding the counts for occurrence histogram intervals with the same values; ...