1. A method of digitally processing a signal comprising: sampling the signal and dividing the samples into windows; associating one of at least three values with a respective window based upon whether the samples in the window are relatively constant, incremental, or decremental, to thereby generate an approximation vector; determining locations of thresholds in the approximation vector to generate a threshold position vector that indicates the locations of thresholds in the approximation vector; and assigning threshold values to the threshold positions in the threshold position vector to thereby generate a set of threshold values.