Executable Compression
Back in the days of MS-DOS the root cause for many problems was the limiting nature of the hardware.
One of the most limiting factors was the floppy disk. Today we think of the floppy as being 1.44Mb large, but this was simply the most popular size at the end of its life1.
This was the major limit for software distribution and storage. Even when we gained larger hard disks that gave us a luxurious 40 or 80Mb, things were still tight. If nothing else, the size of a floppy disk limited how much data we could transfer between machines, even if how much we could store on the machine was increasing.2
But there was an interesting trick that became popular in the late 80s and early 90s - executable compression.
When a program is compiled into an executable file, the compiler often takes all the strings and places them into one area of memory to make for simple retrieval. It may also choose to store blank areas to use as buffers for data input. That may sound odd, but MS-DOS is going to load the whole program into memory before handing over execution to it - so why bother allocating memory after that when you can just have the buffer ready to go from the very start? It was a common technique at the time.
Whilst the compiled code may not be very compressible these strings and buffers are. You can often shave 15-25% or more off a medium sized program with fairly light compression.
The downsides are fairly simple. The decompressor uses up to 4 kilobytes of precious memory. And when your program loads, it has to spend CPU cycles decompressing the image before it can run.
Those CPU cycles turnout to be less of an issue on an 8086 or later. An 8088 with its 8-bit bus might struggle, but any truly 16-bit processor was just fine, as it had the bandwidth to be able to decompress quickly enough that the user didn’t really notice.
You wouldn’t want to use this compression on a 400Kb executable, but anything in the up to 100Kb would be fine. The space in between was very much a case by case basis.
Executable compression may seem esoteric and specialist, but I think it’s a really good example of the kinds of tradeoffs being made in late 80s and early 90s computing.