A method, device and computer program for handling a data stream comprising a number of data objects, wherein for at least one of these data objects a decision is made whether a compression is conducted based on a value representing a compression factor of the data object.