Hi embedded_systems,
Yes! esptool.py can compress the image when it goes over the serial link to reduce the number of transferred bytes. It's decompressed when written to flash.
You can absolutely do something similar when sending the image over the air. The
IDF "OTA" support deals with the on-device aspects of the OTA update (writing to flash, changing the currently selected app, etc). The network layer is more or less up to you.
There is an OTA example in IDF that uses a very basic HTTP transfer, but we'd encourage production use to use a different protocol (HTTPS or something else). You could use HTTP/S's gzip compression feature or something else to reduce the transfer size.
The ESP32 ROM actually includes a copy of the "miniz" gzip library that can be called from IDF apps:
https://github.com/espressif/esp-idf/bl ... om/miniz.h
(Regarding the network layer and the OTA example, we have plans to roll out an IDF HTTP/S client library and also some more comprehensive production-ready examples of "higher level" functionality like OTA. I don't have an ETA for these right now.)