1. A method of lossless encoding of a block of quantization indices in a transform domain for transmission as a bitstream, the method including: modeling the spread of the quantization indices with an envelope function which is described by at least one envelope parameter; for each quantization index: recreating an upper boundary and a lower boundary of a quantization region corresponding to the index; determining a respective value of the at least one envelope parameter value at a position of the envelope function that corresponds to the index; and determining upper and lower probability values for the index by multiplying said upper and lower boundaries with the inverse of the determined at least one parameter value; and arithmetically encoding the upper and lower probability values for the index, encoding the at least one envelope parameter describing the envelope function; and providing a bitstream for transmission to a decoder, which bitstream includes the arithmetically encoded quantization indices and the encoded at least one envelope parameter.