P2 executable compression as standalone script
Wuerfel_21
Posts: 5,049
in Propeller 2
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
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.