A method of encoding time series data, the method comprising: receiving (S110) a plurality of data packets of time series data; and sequentially encoding (S120) the plurality of data packets, wherein sequentially encoding (S120) the plurality of data packets comprises, for a data packet among the plurality of data packets: obtaining (S210) a reference data packet for the data packet; obtaining (S220) a mask packet indicative of which of the bits in the data packet are predictable and which of the bits in the data packet are not predictable; obtaining (S230) change history data indicative of previously changed bits of the mask packet; determining (S240) an updated mask packet based on the mask packet, the data packet, and the reference data packet; determining (S250) updated change history data based on the change history data, the mask packet, and the updated mask packet; determining (S260), as unpredictable bits, all those bits of the data packet that are indicated as not predictable by the updated mask packet; and generating (S270) an encoded data packet including a representation of the updated change history data and a representation of values of the unpredictable bits of the data packet. receiving (S110) a plurality of data packets of time series data; and sequentially encoding (S120) the plurality of data packets, wherein sequentially encoding (S120) the plurality of data packets comprises, for a data packet among the plurality of data packets: obtaining (S210) a reference data packet for the data packet; obtaining (S220) a mask packet indicative of which of the bits in the data packet are predictable and which of the bits in the data packet are not predictable; obtaining (S230) change history data indicative of previously changed bits of the mask packet; determining (S240) an updated mask packet based on the mask packet, the data packet, and the reference data packet; determining (S250) updated change history data based on the change history data, the mask packet, and the updated mask packet; determining (S260), as unpredictable bits, all those bits of the data packet that are indicated as not predictable by the updated mask packet; and generating (S270) an encoded data packet including a representation of the updated change history data and a representation of values of the unpredictable bits of the data packet. obtaining (S210) a reference data packet for the data packet; obtaining (S220) a mask packet indicative of which of the bits in the data packet are predictable and which of the bits in the data packet are not predictable; obtaining (S230) change history data indicative of previously changed bits of the mask packet; determining (S240) an updated mask packet based on the mask packet, the data packet, and the reference data packet; determining (S250) updated change history data based on the change history data, the mask packet, and the updated mask packet; determining (S260), as unpredictable bits, all those bits of the data packet that are indicated as not predictable by the updated mask packet; and generating (S270) an encoded data packet including a representation of the updated change history data and a representation of values of the unpredictable bits of the data packet. <EOS>