A data decoding method for decoding a set of data values representing transform coefficient values, the method comprising the steps of: decoding a first code portion for each data value of one or more data sets indicative of a significance map of the transform coefficient values, the data sets being encoded in an input data stream using context adaptive binary arithmetic encoding; decoding a second code portion of at least those data values not fully encoded by the first portion, the second portion being a two-part variable length code having a unary coded prefix and a suffix, the number of bits of the second portion depending upon a length parameter n, where n is an integer, data defining the second portion being included in the input data stream and, if a data value has not been fully decoded by the respective first and second portions, decoding a remaining third code portion of the data value from the input data stream encoded using a two-part variable length code having a unary coded prefix and a suffix; detecting, for a subset of the data values, (i) instances of data values for which a third portion has been encoded, (ii) instances of data values for which a second portion has been encoded and for which the data value was fully encoded by the first and second portions and (iii) detecting a total number of instances, in respect of that subset of data values, for which a second portion was encoded; and varying n for use in respect of subsequent data values according to the results of the detecting step, the varying step comprising: increasing the value of n if the number of instances of data values, for which a third portion has been encoded, exceeds a first predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded; and reducing the value of n if the number of instances of data values for which a second portion has been encoded and for which the data value was fully encoded by first and second portions, exceeds a second predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded. decoding a first code portion for each data value of one or more data sets indicative of a significance map of the transform coefficient values, the data sets being encoded in an input data stream using context adaptive binary arithmetic encoding; decoding a second code portion of at least those data values not fully encoded by the first portion, the second portion being a two-part variable length code having a unary coded prefix and a suffix, the number of bits of the second portion depending upon a length parameter n, where n is an integer, data defining the second portion being included in the input data stream and, if a data value has not been fully decoded by the respective first and second portions, decoding a remaining third code portion of the data value from the input data stream encoded using a two-part variable length code having a unary coded prefix and a suffix; detecting, for a subset of the data values, (i) instances of data values for which a third portion has been encoded, (ii) instances of data values for which a second portion has been encoded and for which the data value was fully encoded by the first and second portions and (iii) detecting a total number of instances, in respect of that subset of data values, for which a second portion was encoded; and varying n for use in respect of subsequent data values according to the results of the detecting step, the varying step comprising: increasing the value of n if the number of instances of data values, for which a third portion has been encoded, exceeds a first predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded; and reducing the value of n if the number of instances of data values for which a second portion has been encoded and for which the data value was fully encoded by first and second portions, exceeds a second predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded. increasing the value of n if the number of instances of data values, for which a third portion has been encoded, exceeds a first predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded; and reducing the value of n if the number of instances of data values for which a second portion has been encoded and for which the data value was fully encoded by first and second portions, exceeds a second predetermined proportion of the total number of instances, in respect of that subset of data values, for which a second portion was encoded.