1. A computer-implemented method of encoding data, the method comprising: obtaining, in a computer, a first cumulative probability for a quantized sample of a signal to be greater than or equal to a quantized sample x i of the signal; obtaining a second cumulative probability for a quantized sample of the signal to be greater than or equal to a quantized sample x i +1; computing a direct probability for the quantized sample x i of the signal, using the obtained first and second cumulative probabilities; and encoding the quantized sample x i of the signal, based at least in part on the computed direct probability for the quantized sample x i of the signal to produce a decodable representation of the data.