A method of performing data compression for compressing image data, the method comprising: performing spatial decorrelation at a spatial decorrelation module; performing entropy encoding on a plurality of data values to form an encoded data output including a plurality of encoded data values representing the respective plurality of data values, wherein said performing entropy encoding comprises: receiving the data values, wherein the received data values have been processed by the spatial decorrelation module, and wherein the received data values relate to respective pixel values; and for each set of a plurality of sets of received data values: determining a number of bits which can be used to represent the maximum value of the received data values in the set; including, in the encoded data output, an indication of said determined number of bits; and including, in the encoded data output, the encoded data values representing the received data values in the set, wherein each of the encoded data values has said determined number of bits; wherein each of the sets of received data values relates to a respective two dimensional set of pixel values, characterised in that the received data values are organised into blocks, wherein each block comprises a plurality of sets of received data values, and wherein the encoded data output for each block of received data values comprises: a size indication field which includes said indications of the determined numbers of bits for the plurality of sets of received data values of the block; and a variable size field which includes the encoded data values representing the received data values of the block. performing spatial decorrelation at a spatial decorrelation module; performing entropy encoding on a plurality of data values to form an encoded data output including a plurality of encoded data values representing the respective plurality of data values, wherein said performing entropy encoding comprises: receiving the data values, wherein the received data values have been processed by the spatial decorrelation module, and wherein the received data values relate to respective pixel values; and for each set of a plurality of sets of received data values: determining a number of bits which can be used to represent the maximum value of the received data values in the set; including, in the encoded data output, an indication of said determined number of bits; and including, in the encoded data output, the encoded data values representing the received data values in the set, wherein each of the encoded data values has said determined number of bits; wherein each of the sets of received data values relates to a respective two dimensional set of pixel values, characterised in that the received data values are organised into blocks, wherein each block comprises a plurality of sets of received data values, and wherein the encoded data output for each block of received data values comprises: a size indication field which includes said indications of the determined numbers of bits for the plurality of sets of received data values of the block; and a variable size field which includes the encoded data values representing the received data values of the block. receiving the data values, wherein the received data values have been processed by the spatial decorrelation module, and wherein the received data values relate to respective pixel values; and for each set of a plurality of sets of received data values: determining a number of bits which can be used to represent the maximum value of the received data values in the set; including, in the encoded data output, an indication of said determined number of bits; and including, in the encoded data output, the encoded data values representing the received data values in the set, wherein each of the encoded data values has said determined number of bits; determining a number of bits which can be used to represent the maximum value of the received data values in the set; including, in the encoded data output, an indication of said determined number of bits; and including, in the encoded data output, the encoded data values representing the received data values in the set, wherein each of the encoded data values has said determined number of bits; wherein each of the sets of received data values relates to a respective two dimensional set of pixel values, characterised in that the received data values are organised into blocks, wherein each block comprises a plurality of sets of received data values, and wherein the encoded data output for each block of received data values comprises: a size indication field which includes said indications of the determined numbers of bits for the plurality of sets of received data values of the block; and a variable size field which includes the encoded data values representing the received data values of the block. a size indication field which includes said indications of the determined numbers of bits for the plurality of sets of received data values of the block; and a variable size field which includes the encoded data values representing the received data values of the block.