LxLite

From EDM2
Jump to: navigation, search

A utility that compresses and de-compresses executables in the Linear Executable (LX) format that is native to OS/2, that includes .EXE, .DLL, .PDR, .FON, .QPR, .DRV, .VDD and .SYS files. OS/2 1.x and 2.x can work with run length limited/encoded (RLL/RLE) packed files in a way similar to how DOS v4 and up compresses executables but with the release of the SDK for OS/2 Warp (OS/2 v3) and the subsequent GA release of the operating system itself a LZ method of compressing executables in a way more similar to the Zip format was introduced that offered considerably smaller files, and updated version of the LINK386 utility was shipped to handle the compression of the files at link time. Decompression is then handled by the OS/2 WARP program loader at runtime, and in most cases a LZ compressed program loads faster than an uncompressed or RLL compressed one.

LxLite is a utility that can compress any OS/2 LX executable using either method and in most cases compress NE executables as well (DOS 4 and up, Windows 3.x and OS/2 1.x), and in addition performs the compression better than LINK386 or other utilities. It can also decompress and/or repack executables compressed by either method

LxLite advantages
  • Allows you to make smaller and faster executables if you are:
    • You are using third party LX linkers that offer limited or no compression (Borland and so on)
    • Using a LX linker or assembler with only limited compression options.
    • Using a compatible NE OS/2 1.x, 2.x, Windows 3.x or DOS tool
  • Decompresses executable files packed with any known method, either by itself or by other OS/2 utilities.
  • Can re-compress files with a better compression method without having to decompress the file first.
LxLite disadvantages
  • Slightly less compatible than some other tools, but however is smart enough to simply refuse to work on files that it is not compatible with.

Common usage examples

The following usage example is fairly safe and should work with any executable file, regardless of type:

lxlite file.name /ydd /yxd /d

The following will give even better compression, but is known to give problems with some DLL files:

lxlite file.name /mr3 /ml1 /mf2 /ydd /yxd /d

Unlock.exe

LxLite also comes with a highly useful tool called "UnLock", when OS/2 loads an executable it locks the file and refuses to let anyone write over it, however there is an undocumented way to circumvent this provided by the OS, so that it can update system files and so on. Unlock simply allows you to unlock a file for overwriting, which is highly useful not only for compressing system files, but also as a general utility for updating files that you would rather not stop executing.

Version

  • 1.3.9 (2018-02-28) RPM/YUM - "yum install lxlite"
  • 1.3.8 (2015-03-06) [lxlt138u.zip] (Virtual Pascal sources)

Bugs and limitations

  • Executables made with Watcom C/C++, VX-REXX & Fortran cannot be compressed by LxLite for various reasons, modern Open Watcom releases have partly fixed this, but you will still find that some executables do not work, you will have to force LxLite to work on them since usually it ignores Watcom files for this reason.
  • Not all DOS and Windows 3.x NE executables can be compressed.

Targets

  • OS/2 Version 3 (Warp) and later
  • OS/2 Server Version 4 and later
  • OS/2 Workspace On Demand (All versions)
  • JavaOS (All versions, but limited utility)
  • OS/2 Embedded (All versions)
  • eComStation (All versions)
Does not work for the following targets unless RLL compression is specified
  • OS/2 versions 1.x and 2.x
  • OS/2 server versions 1.x to 3.x (or any other server bundles based on OS/2 v1.x or v2.x)
  • OS/2 SMP 2.x
  • DOS v4 and up
  • Microsoft Windows 3.x and WinOS/2 (Any version)

Note that LxLite itself (unpacked) appears to work on OS/2 2.1 with all updates.

Does not work for the following targets at all
  • OS/2 PowerPC (this OS version supports executable compression, the LxLite utility does not support the OS however)

License

  • Open source released under the GPL v2

Authors

  • Andrew Zabolotny (Original author)
  • Max Alekseyev (Current maintainer)
  • Veit Kannegieser (Portions)

Alternatives

  • Use LINK386 as the linker, most compilers support this
  • The RePack utility performs similar functions, but has fewer features and less compression. It will however work with some executables created in Watcom C and Fortran that LxLite does not work with.