[Enhancement] Shrink WiFi application size by compressing BLOB #909

Open
opened 2022-07-08 18:51:02 -05:00 by earlephilhower · 0 comments
earlephilhower commented 2022-07-08 18:51:02 -05:00 (Migrated from github.com)

The binary WiFi blobs are 200-400KB in size, but are only used to upload to the Cyw43 WiFi chip. This makes applications grow massively (before taking in to account any add'l LWIP code).

One way to help minimize this bloat would be to compress the BLOBs and decompress them on-the-fly as they are uploaded to the Cyw43 chip.

UZLib is a simple decompressor for gzip blobs and only added ~4K of code to the ESP8266 Arduino code when it was added (it is used there to support compressed OTA).

https://github.com/pfalcon/uzlib/tree/master

A quick test shows that:

  • 220K firmware blob compressed to 138K (~40% savings)
  • 417K firmware blob compressed to 280K (~30% savings)
The binary WiFi blobs are 200-400KB in size, but are only used to upload to the Cyw43 WiFi chip. This makes applications grow massively (before taking in to account any add'l LWIP code). One way to help minimize this bloat would be to compress the BLOBs and decompress them on-the-fly as they are uploaded to the Cyw43 chip. UZLib is a simple decompressor for `gzip` blobs and only added ~4K of code to the ESP8266 Arduino code when it was added (it is used there to support compressed OTA). https://github.com/pfalcon/uzlib/tree/master A quick test shows that: * 220K firmware blob compressed to 138K (~40% savings) * 417K firmware blob compressed to 280K (~30% savings)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#909
No description provided.