Shop OBEX P1 Docs P2 Docs Learn Events
Spin Tools IDE - Page 18 — Parallax Forums

Spin Tools IDE

1121314151618»

Comments

  • @macca said:

    • Added LZ4 compressed binary images
      This generates a compressed binary image using the LZ4 compressor as described here. The Spin2 preferences page has a new option to enable the compression.


      From the command line compiler use the -z switch to enable the compression spinc -u -z Hello.spin2

    :+1:
    What kind of ratios are you getting? (especially with large bytecode projects, I never actually tested it for that). I looked at the code and you're using compression level 12 - I think(TM) the java library counts differently and 17 is the maximum (which is what you want, max level LZ4HC is still plenty fast)

  • maccamacca Posts: 765

    @Wuerfel_21 said:
    What kind of ratios are you getting? (especially with large bytecode projects, I never actually tested it for that). I looked at the code and you're using compression level 12 - I think(TM) the java library counts differently and 17 is the maximum (which is what you want, max level LZ4HC is still plenty fast)

    I tried with MAX_COMPRESSION_LEVEL (17) but generated files larger by 1 or 2 bytes, at least with the few files I tried.
    With 12 it generates files exactly as your example compression.

  • Ah, interesting. Maybe that's some oddity of jvm vs native implementations. So all is good.

Sign In or Register to comment.