A system for generating efficient and compact update packages makes it possible to process a source binary image of software/firmware for an electronic device and a target binary image in order to generate a compact update package. It generates bubbles information that is optionally packaged with the generated update package. Together, the bubbles information and the update package, when delivered to an electronic device, facilitate the upgrade of the electronic device to a new or different version. The system for generating efficient and compact update packages selectively employs residue generation/computation and entropy computation, in addition to other techniques, in order to make the update package more compact.