Vogtinator wrote:
Hm, deflated CPIO or tar archive inflated into memory?
tar has 51200% overhead for storing 1-byte file. Also, what memory? There's no memory, MicroPython runs on 2KB of heap, and all of it is needed to do something useful like blinking LED.
The advantage is that it's a standardized format and easy to create on every platform.
Running simple Python script which creates unbloated archive is also easy on every platform

.
dhylands wrote:I implemented memzip, a read-only filesystem used on the teensy.
Does it support other platforms as well?
Exactly my question when the teensy port was contributed - it appears to be generic feature, why it is made port-specific? No changes to that situation for half-year, so I assume there're indeed reasons why it can't be reused for other platforms. I may imagine at least one though - again, high overhead of ZIP headers. That makes it non-portable for example to Leaflabs Mapple, proof of concept port to which I did lately. There's whole 700 bytes of flash left, and it won't do to spend them on storing useless archive headers. (Btw, shows that my conservatism regarding adding more bytes to uPy was grounded - there's indeed nothing else to add without raising minimum 128K flash requirement).
Also, it would be quite useful to be able to load extern archives, not only ones appended to the binary. Having to recompile micropython everytime someone wants to try an updated module isn't the best way.
Hey, let's remember how it all started - "nspire has a big issue with large folders, every file makes the device slower". Have a decent filesystem, and you don't need all those tricks at all

.
BTW: There are less ugly ways than to include extern binaries inside an object file: objcopy can copy a binary file into a section in an object file. You can then address it directly and it's platform independant,
It requires build platform with objcopy available, whereas including binary data as source-level C arrays work everywhere C works.
simply appending a binary won't work with ELF or other formats.
You either mean some very particular ELF-using system, or imply that these Lua folks lie:
https://github.com/LuaDist/srlua . But they don't, it works

. Doing similar thing for uPy is on my long list of TODOs.