Shop OBEX P1 Docs P2 Docs Learn Events
P2 executable compression as standalone script — Parallax Forums

P2 executable compression as standalone script

This is the same LZ4 compression you get when running flexspin with the --compress flag. Here provided as Ruby or Python script. As you can see, it's trivial. Obviously needs the relevant LZ4 library installed, see the actual files for details.

The main purpose of compressing the executable is actually to reduce startup time, especially when loading over the serial connection. But it should also speed up SD boot time (flash boot is already fast).

Comments

  • maccamacca Posts: 806

    I looked a bit at this, found a java lz4 implementation here (also in maven repository) and ran some tests, the compressor seems compatible with the stub decompressor, so good so far.

    I think I'll add an option to compress the P2 binaries in Spin Tools IDE.

Sign In or Register to comment.