A data decoding apparatus comprising: a decoder configured to decode input encoded data values into decoded data values having a dynamic range, maxTrDynamicRange, the decoder being configured to decode input encoded data values as data sets (2030, 2040, 2050) and as escape codes for values exceeding the range of values that can be encoded by the data sets, in which an escape code comprises a unary coded prefix portion having a prefix length and a non-unary coded suffix portion; the decoder being configured to decode escape codes representing: (i) Golomb-Rice codes with Rice parameter rParam, and (ii) Exponential Golomb codes; characterised in that: the decoder is configured to detect whether the prefix portion includes n prefix bits to signal that the escape code is an Exponential Golomb code and not a Golomb-Rice code, where n is a number of bits equal to 3 or 4; the decoder is configured to determine for an Exponential Golomb code a maximum prefix length, maximumPrefixlength, dependent upon the dynamic range of the decoded data values and a length of the non-unary coded suffix portion, suffixLength, in bits, dependent upon the prefix length; and the relationship between the length of the prefix portion and the length of the non-unary coded suffix portion is such that the maximum length of the prefix portion is not greater than: maximumPrefixlength = 32- (n + maxTrDynamicRange) and in which, at a prefix length equal to maximumPrefixlength, the length of the non-unary coded suffix portion is: suffixLength = maxTrDynamicRange − rParam in which rParam has a value of 0, 1, 2 or 3. a decoder configured to decode input encoded data values into decoded data values having a dynamic range, maxTrDynamicRange, the decoder being configured to decode input encoded data values as data sets (2030, 2040, 2050) and as escape codes for values exceeding the range of values that can be encoded by the data sets, in which an escape code comprises a unary coded prefix portion having a prefix length and a non-unary coded suffix portion; the decoder being configured to decode escape codes representing: (i) Golomb-Rice codes with Rice parameter rParam, and (ii) Exponential Golomb codes; characterised in that: the decoder is configured to detect whether the prefix portion includes n prefix bits to signal that the escape code is an Exponential Golomb code and not a Golomb-Rice code, where n is a number of bits equal to 3 or 4; the decoder is configured to determine for an Exponential Golomb code a maximum prefix length, maximumPrefixlength, dependent upon the dynamic range of the decoded data values and a length of the non-unary coded suffix portion, suffixLength, in bits, dependent upon the prefix length; and the relationship between the length of the prefix portion and the length of the non-unary coded suffix portion is such that the maximum length of the prefix portion is not greater than: maximumPrefixlength = 32- (n + maxTrDynamicRange) and in which, at a prefix length equal to maximumPrefixlength, the length of the non-unary coded suffix portion is: suffixLength = maxTrDynamicRange − rParam in which rParam has a value of 0, 1, 2 or 3. the decoder is configured to detect whether the prefix portion includes n prefix bits to signal that the escape code is an Exponential Golomb code and not a Golomb-Rice code, where n is a number of bits equal to 3 or 4; the decoder is configured to determine for an Exponential Golomb code a maximum prefix length, maximumPrefixlength, dependent upon the dynamic range of the decoded data values and a length of the non-unary coded suffix portion, suffixLength, in bits, dependent upon the prefix length; and the relationship between the length of the prefix portion and the length of the non-unary coded suffix portion is such that the maximum length of the prefix portion is not greater than: maximumPrefixlength = 32- (n + maxTrDynamicRange) and in which, at a prefix length equal to maximumPrefixlength, the length of the non-unary coded suffix portion is: suffixLength = maxTrDynamicRange − rParam in which rParam has a value of 0, 1, 2 or 3.