Patent ID: 7934155

Claim:
A method of reducing size of an electronic collection of media elements, the electronic collection comprising a plurality of media elements, the method comprising the steps of: assigning a weight to each media element in the collection; and reducing size of the media elements in dependency of an desired overall collection size reduction and the weight assigned to each media element, wherein reducing size of the media elements comprises generating a prioritized list of alternative outputs of various compressions for each of the respective media elements, estimating a size of each of the alternative outputs, and selecting a combination of alternative outputs, corresponding to one alternative output per media element, that achieves the desired overall collection size reduction while taking into account (i) updates to the weights assigned to each media element relative to a file size change achieved via a corresponding selected alternative output and (ii) a priority of the selected alternative outputs of each of the respective media elements, wherein said method further comprises the step of: subsequent to reaching a size limit that achieves the desired overall collection size reduction, determining if any of the media elements are improvable by moving to a previous priority alternative output; if so, moving to a previous priority alternative output for the media element with the highest weight and update its weight, and iteratively repeating, until no further improvement is achievable.