[SOLVED]memzip vs frozen - what's the difference?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

[SOLVED]memzip vs frozen - what's the difference?

Post by jickster » Thu Oct 19, 2017 1:49 am

memzip vs frozen - what's the difference?
Last edited by jickster on Wed Nov 01, 2017 5:57 pm, edited 1 time in total.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: memzip vs frozen - what's the difference?

Post by dhylands » Thu Oct 19, 2017 3:59 pm

memzip was created specifically for the teensy and existed long before frozen.

Once frozen was introduced, the teensy port supported both (but only one at a time).

memzip supports uncompressed zip files (i.e. a zipfile containing only uncompressed files) used as a read-only file system. I chose this because they were easy to create on the host, and easy to support on the MCU side, and at the time the only supported filesystem was FAT.

There is also some unmerged code which I'd like to revisit at some point in time which added support for importing modules from a compressed zipfile (since there is now support for uzlib).

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: memzip vs frozen - what's the difference?

Post by jickster » Tue Oct 24, 2017 3:12 pm

dhylands wrote:
Thu Oct 19, 2017 3:59 pm
memzip was created specifically for the teensy and existed long before frozen.

Once frozen was introduced, the teensy port supported both (but only one at a time).

memzip supports uncompressed zip files (i.e. a zipfile containing only uncompressed files) used as a read-only file system. I chose this because they were easy to create on the host, and easy to support on the MCU side, and at the time the only supported filesystem was FAT.

There is also some unmerged code which I'd like to revisit at some point in time which added support for importing modules from a compressed zipfile (since there is now support for uzlib).
So when would I use one vs the other?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: memzip vs frozen - what's the difference?

Post by Roberthh » Tue Oct 24, 2017 3:57 pm

If available use frozen bytecode. It uses less RAM and starts faster, because it is already compiled.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: memzip vs frozen - what's the difference?

Post by dhylands » Sun Oct 29, 2017 1:52 pm

Basically, there isn't any advantage to using memzip currently.

memzip can store python source or pre-compiled .mpy files.

Personally, I would use frozen files versus memzip. Using memzip might make sense when/if support for compressed zipfiles is added.

Post Reply