Date: Tue, 14 Mar 1995 18:02:58 -0500 From: dj (DJ Delorie) To: jensen AT nora DOT gih DOT no Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Compressed executables > A thought just struck me while I was 'liting' some exe files on my drive > the other day. Has anyone ever made a pklite/lzexe-like extension to the > go32 stub? If not, wouldn't this be trivial to implement in the existing > code? An implementations could use either one of the existsting 'invisible' > zip libraries or execute gunzip to uncompress the executable. Programs In V2, the entire program file is read in at startup, and could in theory be read in compressed and decompressed in protected mode. This would make the stub much more complex, and you'd have to code the decompresser in 16-bit assembler or figure out some other trick to use. How about this: modify gzip to uncompress from a stubbed file, and use this: gzip -9 myapp copy/b stub.exe + gzload + myapp.gz myapp.exe The stub would load the (hopefully small) gzload binary, which would read in the next chunk of the merged exe and load the actual program. It would be a bit of work - on the order of writing a debugger, since it need to be able to start a protected mode program and hook it into the PSP. Unless you figure out a way to get the gzload binary out of the way and reuse the memory the stub allocated.