A non-transitory computer readable storage medium storing computer software code which when executing on a processor performs a method of generating an encoded version of an array of data elements for storage in a data processing system, the method comprising:
- generating at least one tree representation for representing the array of data elements, the data values for the nodes of the tree being set such that data values for the data elements of the data array that the tree represents can be derived from the data values for the nodes of the tree;
- generating data representing the node values of the at least one tree representing the data array;
- generating at least one further tree representation in which the node values for the at least one further tree indicate the number of bits used to indicate respective node values in the data generated to represent the node values of the at least one tree representing the data array;
- generating data representing the at least one further tree indicating the number of bits used to indicate the respective node values in the data generated to represent the node values of the at least one tree representing the data array;
- and
- storing the generated data representing the node values of the at least one tree representing the data array and the generated data representing the at least one further tree indicating the number of bits used to indicate the respective node values in the data generated to represent the node values of the at least one tree representing the data array, as an encoded version of the array of data elements.