Switch to LZ4 compression for compiled monitor code

Issue #44 resolved
Sean Kauffman repo owner created an issue

The RDC compression was an interesting idea but, in practice, we would be better served with something much more standard. LZ4 can be decompressed using a very small routine: https://github.com/jart/cosmopolitan/blob/467504308a103865c058f9a0ac858cc22e72240e/libc/nexgen32e/lz4cpy.c and compressed using standard tools. This would result less code to maintain and would almost definitely result in better compression and therefore a smaller binary.

Comments (2)

  1. Sean Kauffman reporter
    -rw-r--r-- 1 sb37fk sb37fk  26852 May 17 15:13 headers.h
    -rw-r--r-- 1 sb37fk sb37fk   7375 May 17 15:13 headers.h.lz4
    -rw-r--r-- 1 sb37fk sb37fk   9326 May 17 15:21 headers.h.rdc
    
    -rw-r--r-- 1 sb37fk sb37fk 173583 May 17 15:13 srccode.c
    -rw-r--r-- 1 sb37fk sb37fk  40218 May 17 15:13 srccode.c.lz4
    -rw-r--r-- 1 sb37fk sb37fk  67093 May 17 15:22 srccode.c.rdc
    

    This is now done in the lz4 branch and it shows good reduction in the size of the compressed code in addition to being easier to maintain.

  2. Sean Kauffman reporter

    Merged. The only concern is that it introduced someone else's GPL code into the code base, which will cause problems if I decide to change the nfer license.

  3. Log in to comment