ChorusOS 4.0 Migration Guide

2.5 Compressed Executables

The storage space of executable files may be reduced by compressing them with the GNU zip utility gzip. When the GZ_FILE feature is enabled, the afexec() and aload() system calls will automatically uncompress .gz files before loading them into memory. Here is an example:

  1. Compress the ls tool on your host:


    $ gzip ls.r
    
  2. Run ls as normal, omitting the .gz extension:


    $ arun ls
    

    or


    $ arun ls.r
    

Dynamic libraries can also be compressed in the same way. See the GZ_FILE(5FEA), the afexec(2K), and the aload(2K) man pages for more information.